Generate code for loops formed with the new builder

Adapt the existing counted loop analysis and range/null check
elimination code to work with the new loop building heuristics.
Cleaned up the old ad-hoc loop builder.

Suspend polling is enabled by default for loops. The backward chaining
cell will be used in self-verification and profiling mode.

If the loop includes accesses to resolved fields/classes, abort code
generation for now and revert to the basic acyclic trace. Added
tests/090-loop-formation to make sure the JIT won't choke on such
instructions.

Change-Id: Idbc57df0a745be3b692f68c1acb6d4861c537f75
diff --git a/vm/compiler/Dataflow.c b/vm/compiler/Dataflow.c
index 26068a1..c3355e9 100644
--- a/vm/compiler/Dataflow.c
+++ b/vm/compiler/Dataflow.c
@@ -2190,8 +2190,7 @@
     GrowableList *ivList = cUnit->loopAnalysis->ivList;
     MIR *mir;
 
-    if (bb->blockType != kDalvikByteCode &&
-        bb->blockType != kTraceEntryBlock) {
+    if (bb->blockType != kDalvikByteCode && bb->blockType != kEntryBlock) {
         return false;
     }
 
@@ -2395,9 +2394,8 @@
         if (bb == NULL) break;
         if (bb->hidden == true) continue;
         if (bb->blockType == kDalvikByteCode ||
-            bb->blockType == kTraceEntryBlock ||
-            bb->blockType == kMethodEntryBlock ||
-            bb->blockType == kMethodExitBlock) {
+            bb->blockType == kEntryBlock ||
+            bb->blockType == kExitBlock) {
             bb->dataFlowInfo = (BasicBlockDataFlow *)
                 dvmCompilerNew(sizeof(BasicBlockDataFlow),
                                true);