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

Unified Diff: src/compiler/simplified-lowering.cc

Issue 931623002: [turbofan] Optimize certain chains of Branch into a Switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 5 years, 10 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: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 23c3e3294474949be02671fa18d96f4d7cf729ee..3084ef011e2154ba2dcd9132e24afb9e53c662a9 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -501,18 +501,14 @@ class RepresentationSelector {
case IrOpcode::kHeapConstant:
return VisitLeaf(node, kRepTagged);
- case IrOpcode::kEnd:
- case IrOpcode::kIfTrue:
- case IrOpcode::kIfFalse:
- case IrOpcode::kReturn:
- case IrOpcode::kMerge:
- case IrOpcode::kThrow:
- return VisitInputs(node); // default visit for all node inputs.
-
case IrOpcode::kBranch:
ProcessInput(node, 0, kRepBit);
Enqueue(NodeProperties::GetControlInput(node, 0));
break;
+ case IrOpcode::kSwitch:
+ ProcessInput(node, 0, kRepWord32);
+ Enqueue(NodeProperties::GetControlInput(node, 0));
+ break;
case IrOpcode::kSelect:
return VisitSelect(node, use, lowering);
case IrOpcode::kPhi:

Powered by Google App Engine
This is Rietveld 408576698