[Portable Compiler] Rework return block marking.

Move the detection of blocks that contain a return from the
GBC emit pass up to Dex parsing.  This allows logic that detects
backward branches that go to method return to skip suspend checks.

Change-Id: I2a606b49850235b59c5faf237a08729e98220f4d
diff --git a/src/compiler/codegen/mir_to_gbc.cc b/src/compiler/codegen/mir_to_gbc.cc
index 79ac242..a2c2bbc 100644
--- a/src/compiler/codegen/mir_to_gbc.cc
+++ b/src/compiler/codegen/mir_to_gbc.cc
@@ -1018,7 +1018,7 @@
         }
         EmitPopShadowFrame(cu);
         cu->irb->CreateRet(GetLLVMValue(cu, rl_src[0].orig_sreg));
-        bb->has_return = true;
+        DCHECK(bb->terminated_by_return);
       }
       break;
 
@@ -1028,7 +1028,7 @@
         }
         EmitPopShadowFrame(cu);
         cu->irb->CreateRetVoid();
-        bb->has_return = true;
+        DCHECK(bb->terminated_by_return);
       }
       break;
 
@@ -1916,7 +1916,7 @@
 
   if (bb->block_type == kEntryBlock) {
     cu->entryTarget_bb = GetLLVMBlock(cu, bb->fall_through->id);
-  } else if ((bb->fall_through != NULL) && !bb->has_return) {
+  } else if ((bb->fall_through != NULL) && !bb->terminated_by_return) {
     cu->irb->CreateBr(GetLLVMBlock(cu, bb->fall_through->id));
   }