diff options
| author | 2013-02-07 09:33:02 -0800 | |
|---|---|---|
| committer | 2013-02-07 10:39:53 -0800 | |
| commit | bbdd05378516f11443fce29a0fbff25ad993db23 (patch) | |
| tree | 29b8d389ec032b8d09d82ec801909a6535f665c4 /src/compiler/codegen | |
| parent | 8dbb708c7dc05c786329eb5c3fff3194ab6472ac (diff) | |
[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
Diffstat (limited to 'src/compiler/codegen')
| -rw-r--r-- | src/compiler/codegen/mir_to_gbc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/codegen/mir_to_gbc.cc b/src/compiler/codegen/mir_to_gbc.cc index 79ac242e74..a2c2bbcca6 100644 --- a/src/compiler/codegen/mir_to_gbc.cc +++ b/src/compiler/codegen/mir_to_gbc.cc @@ -1018,7 +1018,7 @@ static bool ConvertMIRNode(CompilationUnit* cu, MIR* mir, BasicBlock* bb, } 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 @@ static bool ConvertMIRNode(CompilationUnit* cu, MIR* mir, BasicBlock* bb, } EmitPopShadowFrame(cu); cu->irb->CreateRetVoid(); - bb->has_return = true; + DCHECK(bb->terminated_by_return); } break; @@ -1916,7 +1916,7 @@ static bool BlockBitcodeConversion(CompilationUnit* cu, BasicBlock* bb) 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)); } |