Quick compiler code layout

Minor tweaks to the code layout for the Quick compiler.  Repair
damage caused by bitcode conversion & additionally add a new
optimization pass to move unlikely targets to the end of the code
(flipping branch conditons if necessary).  For now, this will only
be applied to target blocks which do an explicit throw and are
dominated by a block terminated by a conditional branch.  Later,
we might want to generalize this capability to enable profile
guidance.

Also, tweaked the basic block combine pass to include blocks
terminated by array access operations whose null check and
range checks have been eliminated.

With this CL, the run-time performance difference between
art-buzbee and art-Quick is in the noise.

Change-Id: Iaf9921220eb6cb33c2418c76e7a6b7b31472dace
diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc
index 4aa0ac8..50630ae 100644
--- a/src/compiler/Frontend.cc
+++ b/src/compiler/Frontend.cc
@@ -519,6 +519,7 @@
     case Instruction::IF_GE:
     case Instruction::IF_GT:
     case Instruction::IF_LE:
+      curBlock->conditionalBranch = true;
       target += (int) insn->dalvikInsn.vC;
       break;
     case Instruction::IF_EQZ:
@@ -527,6 +528,7 @@
     case Instruction::IF_GEZ:
     case Instruction::IF_GTZ:
     case Instruction::IF_LEZ:
+      curBlock->conditionalBranch = true;
       target += (int) insn->dalvikInsn.vB;
       break;
     default:
@@ -720,6 +722,7 @@
   }
 
   if (insn->dalvikInsn.opcode == Instruction::THROW){
+    curBlock->explicitThrow = true;
     if ((codePtr < codeEnd) && contentIsInsn(codePtr)) {
       // Force creation of new block following THROW via side-effect
       findBlock(cUnit, curOffset + width, /* split */ false,
@@ -1074,6 +1077,9 @@
     oatDumpCompilationUnit(cUnit.get());
   }
 
+  /* Do a code layout pass */
+  oatMethodCodeLayout(cUnit.get());
+
   if (cUnit->enableDebug & (1 << kDebugVerifyDataflow)) {
     /* Verify if all blocks are connected as claimed */
     oatDataFlowAnalysisDispatcher(cUnit.get(), verifyPredInfo, kAllNodes,