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

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: Teach alias analysis about FinishRegion. 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
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 16501f9708774341486b4e49e094bd29e9e74b8c..f97edcb7996da361784658d4376e92db58240549 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -901,7 +901,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(),
@@ -913,7 +912,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);
@@ -1051,15 +1049,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();
}
};

Powered by Google App Engine
This is Rietveld 408576698