Reviewers: Sven Panne,
Description:
[turbofan] Don't switchify branches with hints.
[email protected]
Please review this at https://codereview.chromium.org/929403004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+2, -0 lines):
M src/compiler/control-flow-optimizer.cc
Index: src/compiler/control-flow-optimizer.cc
diff --git a/src/compiler/control-flow-optimizer.cc
b/src/compiler/control-flow-optimizer.cc
index
4a19339746bf5db086c1a565ec17ffffd2c126d8..de47589af6462a0bfc5b4f2094273795271e29db
100644
--- a/src/compiler/control-flow-optimizer.cc
+++ b/src/compiler/control-flow-optimizer.cc
@@ -204,6 +204,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
DCHECK_EQ(IrOpcode::kBranch, node->opcode());
Node* branch = node;
+ if (BranchHintOf(branch->op()) != BranchHint::kNone) return false;
Node* cond = NodeProperties::GetValueInput(branch, 0);
if (cond->opcode() != IrOpcode::kWord32Equal) return false;
Int32BinopMatcher m(cond);
@@ -227,6 +228,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
if (it == if_false->uses().end()) break;
Node* branch1 = *it++;
if (branch1->opcode() != IrOpcode::kBranch) break;
+ if (BranchHintOf(branch1->op()) != BranchHint::kNone) break;
if (it != if_false->uses().end()) break;
Node* cond1 = branch1->InputAt(0);
if (cond1->opcode() != IrOpcode::kWord32Equal) break;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.