diff options
Diffstat (limited to 'compiler/optimizing/load_store_elimination.h')
-rw-r--r-- | compiler/optimizing/load_store_elimination.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/optimizing/load_store_elimination.h b/compiler/optimizing/load_store_elimination.h index 60c547cb8b..e73ef5ef34 100644 --- a/compiler/optimizing/load_store_elimination.h +++ b/compiler/optimizing/load_store_elimination.h @@ -25,12 +25,24 @@ class SideEffectsAnalysis; class LoadStoreElimination : public HOptimization { public: + // Whether or not we should attempt partial Load-store-elimination which + // requires additional blocks and predicated instructions. + static constexpr bool kEnablePartialLSE = true; + + // Controls whether to enable VLOG(compiler) logs explaining the transforms taking place. + static constexpr bool kVerboseLoggingMode = false; + LoadStoreElimination(HGraph* graph, OptimizingCompilerStats* stats, const char* name = kLoadStoreEliminationPassName) : HOptimization(graph, name, stats) {} - bool Run() override; + bool Run() override { + return Run(kEnablePartialLSE); + } + + // Exposed for testing. + bool Run(bool enable_partial_lse); static constexpr const char* kLoadStoreEliminationPassName = "load_store_elimination"; |