Implemented peephole optimizations including null-check elimination, redundant ld/st elimination, ad-hoc register renaming and store sinking.
diff --git a/vm/compiler/CompilerIR.h b/vm/compiler/CompilerIR.h
index 712cbae..1eb7c40 100644
--- a/vm/compiler/CompilerIR.h
+++ b/vm/compiler/CompilerIR.h
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include "codegen/Optimizer.h"
+
 #ifndef _DALVIK_VM_COMPILER_IR
 #define _DALVIK_VM_COMPILER_IR
 
@@ -84,6 +86,8 @@
     bool halveInstCount;
     int numChainingCells[CHAINING_CELL_LAST];
     LIR *firstChainingLIR[CHAINING_CELL_LAST];
+    RegisterScoreboard registerScoreboard;      // Track register dependency
+    int optRound;                       // round number to tell an LIR's age
 } CompilationUnit;
 
 BasicBlock *dvmCompilerNewBB(BBType blockType);
@@ -92,6 +96,8 @@
 
 void dvmCompilerAppendLIR(CompilationUnit *cUnit, LIR *lir);
 
+void dvmCompilerInsertLIRBefore(LIR *currentLIR, LIR *newLIR);
+
 /* Debug Utilities */
 void dvmCompilerDumpCompilationUnit(CompilationUnit *cUnit);