Don't merge values for exit block in LSE.
This enables some additional optimizations since exit block doesn't
really merge values.
Test: run-test on host.
Change-Id: I21ed7e0e43a3bc5d9ed2dabfad8462129b904eb7
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index f4f6434..fff61f5 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -1810,6 +1810,11 @@
return HasOnlyOneInstruction(*this) && GetLastInstruction()->IsReturn();
}
+bool HBasicBlock::IsSingleReturnOrReturnVoidAllowingPhis() const {
+ return (GetFirstInstruction() == GetLastInstruction()) &&
+ (GetLastInstruction()->IsReturn() || GetLastInstruction()->IsReturnVoid());
+}
+
bool HBasicBlock::IsSingleTryBoundary() const {
return HasOnlyOneInstruction(*this) && GetLastInstruction()->IsTryBoundary();
}