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

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

Issue 1292033002: [turbofan] Propagate representation information from call descriptors in SimplifiedLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | 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 5ecd30c761a55318d68c83dfc3d84ac2908ba0d7..119c6f0a94bb61b98ae568e4ad6bb4e5c70b32e2 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698