|
[turbofan] Insert dummy values when changing from None type.
Currently we choose the MachineRepresentation::kNone representation for
values of Type::None, and when converting values from the kNone representation
we use "impossible" conversions that will crash at runtime. This
assumes that the impossible conversions should never be hit (the only
way to produce the impossible values is to perform an always-failing
runtime check on a value, such as Smi-checking a string). Note that
this assumes that the runtime check is executed before the impossible
convesrion.
Introducing BitwiseOr type feedback broke this in two ways:
- we always pick Word32 representation for bitwise-or, so the
impossible conversion does not trigger (it only triggers with
None representation), and we could end up with unsupported
conversions from Word32.
- even if we inserted impossible conversions, they are pure conversions.
Since untagging, bitwise-or operations are also pure, we could hoist
all these before the smi check of the inputs and we could hit the
impossible conversions before we get to the smi check.
This CL addresses this by just providing dummy values for conversions
from the Type::None type. It also removes the impossible-to-* conversions.
BUG= chromium:638132
Committed: https://crrev.com/c83b21ab755f1420b6da85b3ff43d7e96ead9bbe
Cr-Commit-Position: refs/heads/master@{#38883}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+92 lines, -202 lines) |
Patch |
|
M |
src/bailout-reason.h
|
View
|
1
2
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm/code-generator-arm.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm64/code-generator-arm64.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/ia32/code-generator-ia32.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/instruction-codes.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/instruction-scheduler.cc
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/instruction-selector.cc
|
View
|
1
2
3
4
|
4 chunks |
+11 lines, -60 lines |
0 comments
|
Download
|
|
M |
src/compiler/machine-operator.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/compiler/machine-operator.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/compiler/mips/code-generator-mips.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/mips64/code-generator-mips64.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/opcodes.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/compiler/ppc/code-generator-ppc.cc
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/representation-change.cc
|
View
|
|
6 chunks |
+24 lines, -24 lines |
0 comments
|
Download
|
|
M |
src/compiler/s390/code-generator-s390.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.cc
|
View
|
1
2
3
|
4 chunks |
+11 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler/typer.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -22 lines |
0 comments
|
Download
|
|
M |
src/compiler/verifier.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/compiler/x64/code-generator-x64.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/x87/code-generator-x87.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-representation-change.cc
|
View
|
|
8 chunks |
+19 lines, -29 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/compiler/regress-638132.js
|
View
|
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
Total messages: 30 (22 generated)
|