summaryrefslogtreecommitdiff
path: root/compiler/optimizing/load_store_elimination.h
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2021-01-22 14:05:13 +0000
committerAlex Light <allight@google.com>2021-01-22 07:15:51 -0800
commitfc1ce4e8be0d977e3d41699f5ec746d68f63c024 (patch)
treeb656aa7c9e62aa181dfbf7fd4f2a0d32b8bf0704 /compiler/optimizing/load_store_elimination.h
parentc6da1be58086e873c9695f8c4c1a3a8ca718696e (diff)
Revert^2 "Partial Load Store Elimination"
This reverts commit 47ac53100303e7e864b7f6d65f17b23088ccf1d6. There was a bug in LSE where we would incorrectly record the shadow$_monitor_ field as not having a default initial value. This caused partial LSE to be unable to compile the Object.identityHashCode function, causing crashes. This issue was fixed in a parent CL. Also updated all Offsets in LSE_test to be outside of the object header regardless of configuration. Test: ./test.py --host Bug: 67037140 Reason for revert: Fixed issue with shadow$_monitor_ field and offsets Change-Id: I4fb2afff4d410da818db38ed833927dfc0f6be33
Diffstat (limited to 'compiler/optimizing/load_store_elimination.h')
-rw-r--r--compiler/optimizing/load_store_elimination.h14
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";