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

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

Issue 2446543002: [turbofan] Support variable size argument popping in TF-generated functions (Closed)
Patch Set: Fix tests and arm64 Created 4 years, 1 month 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/raw-machine-assembler.cc ('k') | src/compiler/tail-call-optimization.cc » ('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 3c606c81b13d045545613d98b11fe16e69455b48..9916d952bdda34d823ec8a10106f5fb479987ad1 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -749,6 +749,23 @@ class RepresentationSelector {
}
}
+ void VisitReturn(Node* node) {
+ int tagged_limit = node->op()->ValueInputCount() +
+ OperatorProperties::GetContextInputCount(node->op()) +
+ OperatorProperties::GetFrameStateInputCount(node->op());
+ // Visit integer slot count to pop
+ ProcessInput(node, 0, UseInfo::TruncatingWord32());
+
+ // Visit value, context and frame state inputs as tagged.
+ for (int i = 1; i < tagged_limit; i++) {
+ ProcessInput(node, i, UseInfo::AnyTagged());
+ }
+ // Only enqueue other inputs (effects, control).
+ for (int i = tagged_limit; i < node->InputCount(); i++) {
+ EnqueueInput(node, i);
+ }
+ }
+
// Helper for an unused node.
void VisitUnused(Node* node) {
int value_count = node->op()->ValueInputCount() +
@@ -2448,10 +2465,14 @@ class RepresentationSelector {
case IrOpcode::kOsrGuard:
return VisitOsrGuard(node);
+ case IrOpcode::kReturn:
+ VisitReturn(node);
+ // Assume the output is tagged.
+ return SetOutput(node, MachineRepresentation::kTagged);
+
// Operators with all inputs tagged and no or tagged output have uniform
// handling.
case IrOpcode::kEnd:
- case IrOpcode::kReturn:
case IrOpcode::kIfSuccess:
case IrOpcode::kIfException:
case IrOpcode::kIfTrue:
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/tail-call-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698