summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-06-24 14:23:56 +0100
committer David Brazdil <dbrazdil@google.com> 2015-06-24 14:25:48 +0100
commitfe659462e7d58bb2585b1bd029f9e08fd9dd32ae (patch)
tree987b9dd7f8278766d2b6a4a65397f2852f1d7ef4 /compiler/optimizing/nodes.cc
parent582195dfcee32586b71b0ed00a973cfc7d7b8b57 (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.cc5
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.