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

Unified Diff: src/compiler/common-operator-reducer.cc

Issue 1218443002: [turbofan] Also update the BranchHint when merging a BooleanNot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/compiler/common-operator.h ('k') | test/unittests/compiler/common-operator-reducer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator-reducer.cc
diff --git a/src/compiler/common-operator-reducer.cc b/src/compiler/common-operator-reducer.cc
index 1ed05f1834bf7b214db79526d8fc5a2f3698c736..24760dc2f596398de81f39aab9d9819d6b263124 100644
--- a/src/compiler/common-operator-reducer.cc
+++ b/src/compiler/common-operator-reducer.cc
@@ -99,6 +99,17 @@ Reduction CommonOperatorReducer::ReduceBranch(Node* node) {
// since we tell the graph reducer that the {branch} was changed and the
// graph reduction logic will ensure that the uses are revisited properly.
node->ReplaceInput(0, cond->InputAt(0));
+ // Negative the hint for {branch}.
Sven Panne 2015/06/26 11:40:56 Why do we need the switch at all? Isn't the simple
Benedikt Meurer 2015/06/26 11:43:40 Done.
+ switch (BranchHintOf(node->op())) {
+ case BranchHint::kTrue:
+ node->set_op(common()->Branch(BranchHint::kFalse));
+ break;
+ case BranchHint::kFalse:
+ node->set_op(common()->Branch(BranchHint::kTrue));
+ break;
+ case BranchHint::kNone:
+ break;
+ }
return Changed(node);
}
Decision const decision = DecideCondition(cond);
« no previous file with comments | « src/compiler/common-operator.h ('k') | test/unittests/compiler/common-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698