Basic block combine pass
Combine basic blocks terminated by instruction that we have since
proven not to throw. This change is intended to relieve some of the
computational load for llvm by reducing the number of basic blocks
it has to contend with.
Also:
Add stats to show how successful check elimination is.
Restore mechanism to disable some expensive optimization passes when
compiling large methods.
Change-Id: I7fae22160988cbefb90ea9fb1cc26d7364e8d229
diff --git a/src/compiler/Dataflow.h b/src/compiler/Dataflow.h
index 9ac54d5..8263f33 100644
--- a/src/compiler/Dataflow.h
+++ b/src/compiler/Dataflow.h
@@ -100,10 +100,12 @@
DF_NULL_CHK_2 | \
DF_NULL_CHK_OUT0)
-#define DF_HAS_NR_CHKS (DF_HAS_NULL_CHKS | \
- DF_RANGE_CHK_1 | \
+#define DF_HAS_RANGE_CHKS (DF_RANGE_CHK_1 | \
DF_RANGE_CHK_2)
+#define DF_HAS_NR_CHKS (DF_HAS_NULL_CHKS | \
+ DF_HAS_RANGE_CHKS)
+
#define DF_A_IS_REG (DF_UA | DF_DA)
#define DF_B_IS_REG (DF_UB)
#define DF_C_IS_REG (DF_UC)
@@ -161,6 +163,10 @@
void oatMethodNullCheckElimination(CompilationUnit*);
+void oatDumpCheckStats(CompilationUnit*);
+
+void oatMethodBasicBlockCombine(CompilationUnit*);
+
void oatMethodBasicBlockOptimization(CompilationUnit*);
} // namespace art