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

Unified Diff: src/compiler/pipeline.cc

Issue 2164253002: [turbofan] New GraphReducer based LoadElimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. REBASE. Created 4 years, 5 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/load-elimination.cc ('k') | test/unittests/compiler/load-elimination-unittest.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 949e279a17d7b0a2b401be7bc94cc347e108381d..a42c80254a9d4010bca7f5b2234c0ad10ad834e2 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -902,7 +902,6 @@ struct TypedLoweringPhase {
data->info()->is_deoptimization_enabled()
? JSIntrinsicLowering::kDeoptimizationEnabled
: JSIntrinsicLowering::kDeoptimizationDisabled);
- ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone());
SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph());
CheckpointElimination checkpoint_elimination(&graph_reducer);
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
@@ -914,7 +913,6 @@ struct TypedLoweringPhase {
}
AddReducer(data, &graph_reducer, &typed_lowering);
AddReducer(data, &graph_reducer, &intrinsic_lowering);
- AddReducer(data, &graph_reducer, &value_numbering);
AddReducer(data, &graph_reducer, &simple_reducer);
AddReducer(data, &graph_reducer, &checkpoint_elimination);
AddReducer(data, &graph_reducer, &common_reducer);
@@ -1052,15 +1050,14 @@ struct LoadEliminationPhase {
static const char* phase_name() { return "load elimination"; }
void Run(PipelineData* data, Zone* temp_zone) {
- // The memory optimizer requires the graphs to be trimmed, so trim now.
- GraphTrimmer trimmer(temp_zone, data->graph());
- NodeVector roots(temp_zone);
- data->jsgraph()->GetCachedNodes(&roots);
- trimmer.TrimGraph(roots.begin(), roots.end());
-
- // Eliminate redundant loads.
- LoadElimination load_elimination(data->graph(), temp_zone);
- load_elimination.Run();
+ JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
+ RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone);
+ LoadElimination load_elimination(&graph_reducer, temp_zone);
+ ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone());
+ AddReducer(data, &graph_reducer, &redundancy_elimination);
+ AddReducer(data, &graph_reducer, &load_elimination);
+ AddReducer(data, &graph_reducer, &value_numbering);
+ graph_reducer.ReduceGraph();
}
};
« no previous file with comments | « src/compiler/load-elimination.cc ('k') | test/unittests/compiler/load-elimination-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698