Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: src/compiler/pipeline.cc

Issue 1206533002: [turbofan] Run DeadCodeElimination together with the advanced reducers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test262 test failure Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index d71ade0ce01fb570f91d5ec5020b4a5254e05372..81a00dd18aa7ef54a4b30871eaae4647be5f14fd 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -407,8 +407,7 @@ class SourcePositionWrapper final : public Reducer {
class JSGraphReducer final : public GraphReducer {
public:
JSGraphReducer(JSGraph* jsgraph, Zone* zone)
- : GraphReducer(zone, jsgraph->graph(), jsgraph->TheHoleConstant(),
- jsgraph->Dead()) {}
+ : GraphReducer(zone, jsgraph->graph(), jsgraph->Dead()) {}
~JSGraphReducer() final {}
};
@@ -565,6 +564,8 @@ struct TypedLoweringPhase {
void Run(PipelineData* data, Zone* temp_zone) {
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
+ DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
+ data->common());
LoadElimination load_elimination(&graph_reducer);
JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph());
JSTypedLowering typed_lowering(&graph_reducer, data->jsgraph(), temp_zone);
@@ -575,6 +576,7 @@ struct TypedLoweringPhase {
: JSIntrinsicLowering::kDeoptimizationDisabled);
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
data->common(), data->machine());
+ AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &builtin_reducer);
AddReducer(data, &graph_reducer, &typed_lowering);
AddReducer(data, &graph_reducer, &intrinsic_lowering);
@@ -593,10 +595,13 @@ struct SimplifiedLoweringPhase {
data->source_positions());
lowering.LowerAllNodes();
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
+ DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
+ data->common());
ValueNumberingReducer vn_reducer(temp_zone);
MachineOperatorReducer machine_reducer(data->jsgraph());
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
data->common(), data->machine());
+ AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &vn_reducer);
AddReducer(data, &graph_reducer, &machine_reducer);
AddReducer(data, &graph_reducer, &common_reducer);
@@ -621,11 +626,14 @@ struct ChangeLoweringPhase {
void Run(PipelineData* data, Zone* temp_zone) {
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
+ DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
+ data->common());
ValueNumberingReducer vn_reducer(temp_zone);
ChangeLowering lowering(data->jsgraph());
MachineOperatorReducer machine_reducer(data->jsgraph());
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
data->common(), data->machine());
+ AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &vn_reducer);
AddReducer(data, &graph_reducer, &lowering);
AddReducer(data, &graph_reducer, &machine_reducer);
@@ -635,20 +643,6 @@ struct ChangeLoweringPhase {
};
-struct LateControlReductionPhase {
- static const char* phase_name() { return "late control reduction"; }
- void Run(PipelineData* data, Zone* temp_zone) {
- GraphReducer graph_reducer(temp_zone, data->graph());
- DeadCodeElimination dce(&graph_reducer, data->graph(), data->common());
- CommonOperatorReducer common(&graph_reducer, data->graph(), data->common(),
- data->machine());
- graph_reducer.AddReducer(&dce);
- graph_reducer.AddReducer(&common);
- graph_reducer.ReduceGraph();
- }
-};
-
-
struct EarlyGraphTrimmingPhase {
static const char* phase_name() { return "early graph trimming"; }
void Run(PipelineData* data, Zone* temp_zone) {
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698