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

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

Issue 2446543002: [turbofan] Support variable size argument popping in TF-generated functions (Closed)
Patch Set: Fix bugs Created 4 years, 2 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 3acefdf163c029692ef2b413b34c16b3ecdc6c57..be6be16463d41fa13a8e2221b9e1a9064352b12c 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() +
@@ -2452,7 +2469,6 @@ class RepresentationSelector {
// 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:
@@ -2487,6 +2503,11 @@ class RepresentationSelector {
// Assume the output is tagged.
return SetOutput(node, MachineRepresentation::kTagged);
+ case IrOpcode::kReturn:
Michael Starzinger 2016/10/28 14:12:14 nit: Please move this up to before the block where
danno 2016/10/31 10:06:40 Done.
+ VisitReturn(node);
+ // Assume the output is tagged.
+ return SetOutput(node, MachineRepresentation::kTagged);
+
default:
V8_Fatal(
__FILE__, __LINE__,

Powered by Google App Engine
This is Rietveld 408576698