|
[turbofan] Proper dead code elimination as regular reducer.
The three different concerns that the ControlReducer used to deal with
are now properly separated into
a.) DeadCodeElimination, which is a regular AdvancedReducer, that
propagates Dead via control edges,
b.) CommonOperatorReducer, which does strength reduction on common
operators (i.e. Branch, Phi, and friends), and
c.) GraphTrimming, which removes dead->live edges from the graph.
This will make it possible to run the DeadCodeElimination together with
other passes that actually introduce Dead nodes, i.e. typed lowering;
and it opens the door for general inlining without two stage fix point
iteration.
To make the DeadCodeElimination easier and more uniform, we basically
reverted the introduction of DeadValue and DeadEffect, and changed the
Dead operator to produce control, value and effect. Note however that
this is not a requirement, but merely a way to make dead propagation
easier and more uniform. We could always go back and decide to have
different Dead operators if some other change requires that.
Note that there are several additional opportunities for cleanup now,
i.e. OSR deconstruction could be a regular reducer now, and we don't
need to use TheHole as dead value marker in the GraphReducer. And we can
actually run the dead code elimination together with the other passes
instead of using separate passes over the graph. We will do this in
follow up CLs.
R=jarin@chromium.org, mstarzinger@chromium.org
Committed: https://crrev.com/733a2463865c8db539d8c71dabdb7e8a3cc8de0a
Cr-Commit-Position: refs/heads/master@{#29146}
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+947 lines, -1707 lines) |
Patch |
|
M |
BUILD.gn
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.h
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
|
4 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler/common-operator.h
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
src/compiler/common-operator.cc
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/common-operator-reducer.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/common-operator-reducer.cc
|
View
|
|
3 chunks |
+99 lines, -4 lines |
0 comments
|
Download
|
|
D |
src/compiler/control-reducer.h
|
View
|
|
1 chunk |
+0 lines, -39 lines |
0 comments
|
Download
|
|
D |
src/compiler/control-reducer.cc
|
View
|
|
1 chunk |
+0 lines, -328 lines |
0 comments
|
Download
|
|
A |
src/compiler/dead-code-elimination.h
|
View
|
|
1 chunk |
+52 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/compiler/dead-code-elimination.cc
|
View
|
|
1 chunk |
+145 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/graph-visualizer.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/js-graph.h
|
View
|
1
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-graph.cc
|
View
|
1
|
1 chunk |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-inlining.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/loop-peeling.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/opcodes.h
|
View
|
|
3 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler/operator-properties.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/osr.cc
|
View
|
1
|
3 chunks |
+24 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/compiler/pipeline.cc
|
View
|
1
|
4 chunks |
+17 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/typer.cc
|
View
|
|
4 chunks |
+5 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/compiler/verifier.cc
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/cctest.gyp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
D |
test/cctest/compiler/test-control-reducer.cc
|
View
|
|
1 chunk |
+0 lines, -1119 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-loop-analysis.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/unittests/compiler/common-operator-reducer-unittest.cc
|
View
|
|
4 chunks |
+182 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/common-operator-unittest.cc
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
|
D |
test/unittests/compiler/control-reducer-unittest.cc
|
View
|
|
1 chunk |
+0 lines, -126 lines |
0 comments
|
Download
|
|
A |
test/unittests/compiler/dead-code-elimination-unittest.cc
|
View
|
|
1 chunk |
+375 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/graph-reducer-unittest.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/graph-trimmer-unittest.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-properties-unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-test-utils.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-test-utils.cc
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/unittests.gyp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tools/gyp/v8.gyp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 10 (2 generated)
|