diff options
| author | 2015-06-26 10:00:03 +0000 | |
|---|---|---|
| committer | 2015-06-26 10:00:04 +0000 | |
| commit | d3eaade87ac079accca30473ef0a3b38ab600828 (patch) | |
| tree | 12dd483fa488b349312e49ffde8cb538845a2b57 /compiler/optimizing/graph_checker.cc | |
| parent | 610a04994ea5988bd6e2e056b658182ec9c445e3 (diff) | |
| parent | 3e18738bd338e9f8363b26bc895f38c0ec682824 (diff) | |
Merge "Revert "ART: Implement try/catch blocks in Builder""
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
| -rw-r--r-- | compiler/optimizing/graph_checker.cc | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index d7e6bd8161..fd28f0b83f 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -81,10 +81,7 @@ void GraphChecker::VisitBasicBlock(HBasicBlock* block) { } // Ensure `block` ends with a branch instruction. - // This invariant is not enforced on non-SSA graphs. Graph built from DEX with - // dead code that falls out of the method will not end with a control-flow - // instruction. Such code is removed during the SSA-building DCE phase. - if (GetGraph()->IsInSsaForm() && !block->EndsWithControlFlowInstruction()) { + if (!block->EndsWithControlFlowInstruction()) { AddError(StringPrintf("Block %d does not end with a branch instruction.", block->GetBlockId())); } @@ -256,22 +253,6 @@ void GraphChecker::VisitInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke) { } } -void GraphChecker::VisitReturn(HReturn* ret) { - if (!ret->GetBlock()->GetSingleSuccessor()->IsExitBlock()) { - AddError(StringPrintf("%s:%d does not jump to the exit block.", - ret->DebugName(), - ret->GetId())); - } -} - -void GraphChecker::VisitReturnVoid(HReturnVoid* ret) { - if (!ret->GetBlock()->GetSingleSuccessor()->IsExitBlock()) { - AddError(StringPrintf("%s:%d does not jump to the exit block.", - ret->DebugName(), - ret->GetId())); - } -} - void SSAChecker::VisitBasicBlock(HBasicBlock* block) { super_type::VisitBasicBlock(block); |