|
[turbofan] Initial version of number type feedback.
This introduces optimized number operations based on type feedback.
Summary of changes:
1. Typed lowering produces SpeculativeNumberAdd/Subtract for JSAdd/Subtract if
there is suitable feedback. The speculative nodes are connected to both the
effect chain and the control chain and they retain the eager frame state.
2. Simplified lowering now executes in three phases:
a. Propagation phase computes truncations by traversing the graph from uses to
definitions until checkpoint is reached. It also records type-check decisions
for later typing phase, and computes representation.
b. The typing phase computes more precise types base on the speculative types (and recomputes
representation for affected nodes).
c. The lowering phase performs lowering and inserts representation changes and/or checks.
3. Effect-control linearization lowers the checks to machine graphs.
Notes:
- SimplifiedLowering will be refactored to have handling of each operation one place and
with clearer input/output protocol for each sub-phase. I would prefer to do this once
we have more operations implemented, and the pattern is clearer.
- The check operations (Checked<A>To<B>) should have some flags that would affect
the kind of truncations that they can handle. E.g., if we know that a node produces
a number, we can omit the oddball check in the CheckedTaggedToFloat64 lowering.
- In future, we want the typer to reuse the logic from OperationTyper.
BUG= v8:4583
LOG=n
Committed: https://crrev.com/216bcf9fb3cd1e24e06d594c5f6a2ebfdcf37d1c
Cr-Commit-Position: refs/heads/master@{#36674}
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+2030 lines, -354 lines) |
Patch |
|
M |
BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+7 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/compiler/effect-control-linearizer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+14 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/effect-control-linearizer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+192 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-inlining.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-operator.h
|
View
|
1
2
3
|
2 chunks |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/js-operator.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-typed-lowering.h
|
View
|
1
2
3
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/js-typed-lowering.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+99 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/compiler/opcodes.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/compiler/operation-typer.h
|
View
|
1
2
|
1 chunk |
+79 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/compiler/operation-typer.cc
|
View
|
1
2
|
1 chunk |
+341 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/operator-properties.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/pipeline.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+12 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/representation-change.h
|
View
|
1
2
3
4
|
4 chunks |
+94 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/compiler/representation-change.cc
|
View
|
1
2
3
4
5
6
7
8
|
13 chunks |
+195 lines, -57 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.h
|
View
|
1
|
3 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
55 chunks |
+513 lines, -170 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-operator.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+11 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-operator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+39 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/type-hint-analyzer.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/type-hints.h
|
View
|
|
2 chunks |
+13 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/type-hints.cc
|
View
|
|
2 chunks |
+30 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/typer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+24 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/verifier.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/flag-definitions.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/v8.gyp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-representation-change.cc
|
View
|
1
2
3
4
5
6
7
8
|
17 chunks |
+126 lines, -86 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/compiler/turbo-number-feedback.js
|
View
|
1
2
3
4
5
6
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/js-typed-lowering-unittest.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+49 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-test-utils.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-test-utils.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+61 lines, -0 lines |
0 comments
|
Download
|
Total messages: 25 (15 generated)
|