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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10698153: Change comparison-to-branch fusion to actually remove comparison from the graph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 407e181af3fcb7cd029e8dec6953a0327ad5fd95..af8384180c2006f54d7c6e608106114823407b9c 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -2279,7 +2279,7 @@ class BranchInstr : public InstructionWithInputs {
value_(value),
true_successor_(NULL),
false_successor_(NULL),
- is_fused_with_comparison_(false),
+ fused_with_comparison_(NULL),
is_negated_(false) { }
DECLARE_INSTRUCTION(Branch)
@@ -2309,11 +2309,13 @@ class BranchInstr : public InstructionWithInputs {
void EmitBranchOnCondition(FlowGraphCompiler* compiler,
Condition true_condition);
- void MarkFusedWithComparison() {
- is_fused_with_comparison_ = true;
+ void MarkFusedWithComparison(ComparisonComp* comp) {
+ fused_with_comparison_ = comp;
}
- bool is_fused_with_comparison() const { return is_fused_with_comparison_; }
+ bool is_fused_with_comparison() const {
+ return fused_with_comparison_ != NULL;
+ }
bool is_negated() const { return is_negated_; }
void set_is_negated(bool value) { is_negated_ = value; }
@@ -2321,7 +2323,7 @@ class BranchInstr : public InstructionWithInputs {
Value* value_;
TargetEntryInstr* true_successor_;
TargetEntryInstr* false_successor_;
- bool is_fused_with_comparison_;
+ ComparisonComp* fused_with_comparison_;
bool is_negated_;
DISALLOW_COPY_AND_ASSIGN(BranchInstr);

Powered by Google App Engine
This is Rietveld 408576698