diff options
| author | 2015-06-24 14:23:56 +0100 | |
|---|---|---|
| committer | 2015-06-24 14:25:48 +0100 | |
| commit | fe659462e7d58bb2585b1bd029f9e08fd9dd32ae (patch) | |
| tree | 987b9dd7f8278766d2b6a4a65397f2852f1d7ef4 /compiler/optimizing/nodes.cc | |
| parent | 582195dfcee32586b71b0ed00a973cfc7d7b8b57 (diff) | |
ART: Stop creating a fallthrough block for Goto
Optimizing's Builder used to create a basic block after a Goto under
the assumption that control flow can fall through.
Bug: 19084197
Change-Id: Id85f31df98a4177466750d3cd0bc8bb74782ca2d
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 01eb2d7f86..feb9afe996 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1035,9 +1035,8 @@ HBasicBlock* HBasicBlock::SplitAfter(HInstruction* cursor) { bool HBasicBlock::IsSingleGoto() const { HLoopInformation* loop_info = GetLoopInformation(); - // TODO: Remove the null check b/19084197. - return GetFirstInstruction() != nullptr - && GetPhis().IsEmpty() + DCHECK(EndsWithControlFlowInstruction()); + return GetPhis().IsEmpty() && GetFirstInstruction() == GetLastInstruction() && GetLastInstruction()->IsGoto() // Back edges generate the suspend check. |