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

Unified Diff: src/compiler/instruction-selector.cc

Issue 1488553002: [turbofan] Fewer gap moves for tail calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ia32/code-generator-ia32.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index ced7c4f369a91221cb8176b4c4a1c27155d5a60d..70e043d82d9359f1f2eb9221bd4bf01f97e39fe7 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -507,12 +507,11 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
}
DCHECK_EQ(input_count, buffer->instruction_args.size() + pushed_count -
buffer->frame_state_value_count());
- if (call_tail && stack_param_delta != 0) {
- // For tail calls that change the size of their parameter list, move the
- // saved caller return address, parent frame pointer and parent constant
- // pool pointer to just above the parameters.
-
- // Return address
+ if (V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK && call_tail &&
+ stack_param_delta != 0) {
+ // For tail calls that change the size of their parameter list and keep
+ // their return address on the stack, move the return address to just above
+ // the parameters.
LinkageLocation saved_return_location =
LinkageLocation::ForSavedCallerReturnAddress();
InstructionOperand return_address =
@@ -520,26 +519,6 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
saved_return_location, stack_param_delta),
saved_return_location);
buffer->instruction_args.push_back(return_address);
-
- // Parent frame pointer
- LinkageLocation saved_frame_location =
- LinkageLocation::ForSavedCallerFramePtr();
- InstructionOperand saved_frame =
- g.UsePointerLocation(LinkageLocation::ConvertToTailCallerLocation(
- saved_frame_location, stack_param_delta),
- saved_frame_location);
- buffer->instruction_args.push_back(saved_frame);
-
- if (V8_EMBEDDED_CONSTANT_POOL) {
- // Constant pool pointer
- LinkageLocation saved_cp_location =
- LinkageLocation::ForSavedCallerConstantPool();
- InstructionOperand saved_cp =
- g.UsePointerLocation(LinkageLocation::ConvertToTailCallerLocation(
- saved_cp_location, stack_param_delta),
- saved_cp_location);
- buffer->instruction_args.push_back(saved_cp);
- }
}
}
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698