Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1623)

Unified Diff: runtime/vm/intermediate_language.cc

Issue 14057004: Convert diamond shaped control flow into a single conditional instruction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Florian's comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 292d6aaf0ed60460eeddbbff82f3a1d36ab2a8f6..3bf99bd6052bce7e781d0cd08bf4cb879c711db8 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2039,6 +2039,14 @@ void LoadIndexedInstr::InferRange() {
}
+void IfThenElseInstr::InferRange() {
+ const intptr_t min = Utils::Minimum(if_true_, if_false_);
+ const intptr_t max = Utils::Maximum(if_true_, if_false_);
+ range_ = new Range(RangeBoundary::FromConstant(min),
+ RangeBoundary::FromConstant(max));
+}
+
+
void PhiInstr::InferRange() {
RangeBoundary new_min;
RangeBoundary new_max;

Powered by Google App Engine
This is Rietveld 408576698