Commit 2477b8f3 authored by titzer's avatar titzer Committed by Commit bot

[turbofan] Propagate representation information from call descriptors in SimplifiedLowering.

R=jarin@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1292033002

Cr-Commit-Position: refs/heads/master@{#30157}
parent 8eeec89b
......@@ -414,6 +414,25 @@ class RepresentationSelector {
}
}
void VisitCall(Node* node, SimplifiedLowering* lowering) {
const CallDescriptor* desc = OpParameter<const CallDescriptor*>(node->op());
const MachineSignature* sig = desc->GetMachineSignature();
int params = static_cast<int>(sig->parameter_count());
// Propagate representation information from call descriptor.
for (int i = 0; i < node->InputCount(); i++) {
if (i == 0) {
// The target of the call.
ProcessInput(node, i, 0);
} else if ((i - 1) < params) {
ProcessInput(node, i, sig->GetParam(i - 1));
} else {
ProcessInput(node, i, 0);
}
}
SetOutput(node, desc->GetMachineSignature()->GetReturn());
}
void VisitStateValues(Node* node) {
if (phase_ == PROPAGATE) {
for (int i = 0; i < node->InputCount(); i++) {
......@@ -533,6 +552,8 @@ class RepresentationSelector {
return VisitSelect(node, use, lowering);
case IrOpcode::kPhi:
return VisitPhi(node, use, lowering);
case IrOpcode::kCall:
return VisitCall(node, lowering);
//------------------------------------------------------------------
// JavaScript operators.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment