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

Unified Diff: src/compiler/pipeline.cc

Issue 2183033002: [turbofan] Run JSGenericLowering as separate phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | 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 5e0dbd9b46f52dcfdc197ddb3c5fb6b0f23ffe36..036bf6f528a8d1076cc6d9e7e1a738e6bb0b4b3e 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -973,12 +973,22 @@ struct LoopExitEliminationPhase {
}
};
+struct GenericLoweringPhase {
+ static const char* phase_name() { return "generic lowering"; }
+
+ void Run(PipelineData* data, Zone* temp_zone) {
+ JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
+ JSGenericLowering generic_lowering(data->jsgraph());
+ AddReducer(data, &graph_reducer, &generic_lowering);
+ graph_reducer.ReduceGraph();
+ }
+};
+
struct EarlyOptimizationPhase {
static const char* phase_name() { return "early optimization"; }
void Run(PipelineData* data, Zone* temp_zone) {
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
- JSGenericLowering generic_lowering(data->jsgraph());
DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
data->common());
SimplifiedOperatorReducer simple_reducer(&graph_reducer, data->jsgraph());
@@ -990,7 +1000,6 @@ struct EarlyOptimizationPhase {
AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &simple_reducer);
AddReducer(data, &graph_reducer, &redundancy_elimination);
- AddReducer(data, &graph_reducer, &generic_lowering);
AddReducer(data, &graph_reducer, &value_numbering);
AddReducer(data, &graph_reducer, &machine_reducer);
AddReducer(data, &graph_reducer, &common_reducer);
@@ -1507,9 +1516,9 @@ bool PipelineImpl::CreateGraph() {
RunPrintAndVerify("Untyped", true);
#endif
- // Run early optimization pass.
- Run<EarlyOptimizationPhase>();
- RunPrintAndVerify("Early optimized", true);
+ // Run generic lowering pass.
+ Run<GenericLoweringPhase>();
+ RunPrintAndVerify("Generic lowering", true);
data->EndPhaseKind();
@@ -1521,6 +1530,10 @@ bool PipelineImpl::OptimizeGraph(Linkage* linkage) {
data->BeginPhaseKind("block building");
+ // Run early optimization pass.
+ Run<EarlyOptimizationPhase>();
+ RunPrintAndVerify("Early optimized", true);
+
Run<EffectControlLinearizationPhase>();
RunPrintAndVerify("Effect and control linearized", true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698