Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 11443e71ccbfabb4d831589121cdc5daf6ddbf5b..ba1fbd69cbda6f92a77d1f2cf65870d3a658e81c 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -9,6 +9,7 @@ |
#include "src/base/adapters.h" |
#include "src/base/platform/elapsed-timer.h" |
+#include "src/compiler/all-nodes.h" |
Jarin
2016/06/23 09:58:28
You should not need to add that.
bgeron
2016/06/23 12:03:05
Done.
|
#include "src/compiler/ast-graph-builder.h" |
#include "src/compiler/ast-loop-assignment-analyzer.h" |
#include "src/compiler/basic-block-instrumentor.h" |
@@ -58,6 +59,7 @@ |
#include "src/compiler/simplified-lowering.h" |
#include "src/compiler/simplified-operator-reducer.h" |
#include "src/compiler/simplified-operator.h" |
+#include "src/compiler/store-store-elimination.h" |
#include "src/compiler/tail-call-optimization.h" |
#include "src/compiler/type-hint-analyzer.h" |
#include "src/compiler/typer.h" |
@@ -1031,6 +1033,15 @@ struct EffectControlLinearizationPhase { |
} |
}; |
+struct StoreStoreEliminationPhase { |
+ static const char* phase_name() { return "Store-store elimination"; } |
+ |
+ void Run(PipelineData* data, Zone* temp_zone) { |
+ StoreStoreElimination store_store_elimination(data->jsgraph(), temp_zone); |
+ store_store_elimination.Run(); |
+ } |
+}; |
+ |
struct MemoryOptimizationPhase { |
static const char* phase_name() { return "memory optimization"; } |
@@ -1474,6 +1485,11 @@ bool PipelineImpl::OptimizeGraph(Linkage* linkage) { |
Run<EffectControlLinearizationPhase>(); |
RunPrintAndVerify("Effect and control linearized", true); |
+ if (FLAG_turbo_store_elimination) { |
+ Run<StoreStoreEliminationPhase>(); |
+ RunPrintAndVerify("Store-store elimination", true); |
+ } |
+ |
Run<BranchEliminationPhase>(); |
RunPrintAndVerify("Branch conditions eliminated", true); |