Compiler cleanup
o Added slow path for string resolution
o Removed dead throw internal and runtime error
o Restructured debug and optimization disable flags for make it easier
for command-line option support.
o Removed/converted #if 1/0 blocks
Change-Id: I65fc561a55437b3f74d0dfff5af87f938008d70e
diff --git a/src/compiler/Compiler.h b/src/compiler/Compiler.h
index ba97aac..f9e2478 100644
--- a/src/compiler/Compiler.h
+++ b/src/compiler/Compiler.h
@@ -26,6 +26,39 @@
DALVIK_OAT_THUMB2,
} OatInstructionSetType;
+/* Supress optimization if corresponding bit set */
+enum optControlVector {
+ kLoadStoreElimination = 0,
+ kLoadHoisting,
+ kSuppressLoads,
+ kNullCheckElimination,
+ kPromoteRegs,
+ kTrackLiveTemps,
+};
+
+extern uint32_t compilerOptimizerDisableFlags;
+
+/* Force code generation paths for testing */
+enum debugControlVector {
+ kDebugDisplayMissingTargets,
+ kDebugVerbose,
+ kDebugDumpCFG,
+ kDebugSlowFieldPath,
+ kDebugSlowInvokePath,
+ kDebugSlowStringPath,
+ kDebugSlowTypePath,
+ kDebugSlowestFieldPath,
+ kDebugSlowestStringPath,
+};
+
+extern uint32_t compilerDebugFlags;
+
+/* If non-empty, apply optimizer/debug flags only to matching methods */
+extern std::string compilerMethodMatch;
+
+/* Flips sense of compilerMethodMatch - apply flags if doesn't match */
+extern bool compilerFlipMatch;
+
typedef enum OatMethodAttributes {
kIsCallee = 0, /* Code is part of a callee (invoked by a hot trace) */
kIsHot, /* Code is part of a hot trace */