Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 11443e71ccbfabb4d831589121cdc5daf6ddbf5b..11974a34c8a73a467f134a8f7a017593ac2cf83b 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -58,6 +58,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 +1032,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 +1484,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); |