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

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

Issue 1015423002: [turbofan] Remember types for deoptimization during simplified lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 5 years, 9 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/opcodes.h ('k') | src/compiler/state-values-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 36cec4fa0b28b6bc36cdf82ee7bbf0fda6f49b03..efefc83467a02cbd54256708c483de73738ab5a5 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -424,6 +424,25 @@ class RepresentationSelector {
}
}
+ void VisitStateValues(Node* node) {
+ if (phase_ == PROPAGATE) {
+ for (int i = 0; i < node->InputCount(); i++) {
+ Enqueue(node->InputAt(i), kTypeAny);
+ }
+ } else {
+ Zone* zone = jsgraph_->zone();
+ ZoneVector<MachineType>* types =
+ new (zone->New(sizeof(ZoneVector<MachineType>)))
+ ZoneVector<MachineType>(node->InputCount(), zone);
+ for (int i = 0; i < node->InputCount(); i++) {
+ MachineTypeUnion input_type = GetInfo(node->InputAt(i))->output;
+ (*types)[i] = static_cast<MachineType>(input_type);
+ }
+ node->set_op(jsgraph_->common()->TypedStateValues(types));
+ }
+ SetOutput(node, kMachAnyTagged);
+ }
+
const Operator* Int32Op(Node* node) {
return changer_->Int32OperatorFor(node->opcode());
}
@@ -1039,10 +1058,7 @@ class RepresentationSelector {
case IrOpcode::kLoadStackPointer:
return VisitLeaf(node, kMachPtr);
case IrOpcode::kStateValues:
- for (int i = 0; i < node->InputCount(); i++) {
- ProcessInput(node, i, kTypeAny);
- }
- SetOutput(node, kMachAnyTagged);
+ VisitStateValues(node);
break;
default:
VisitInputs(node);
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/state-values-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698