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

Issue 1439613003: [turbofan] Better and more sane support for tail calls (Closed)

Created:
5 years, 1 month ago by danno
Modified:
5 years, 1 month ago
Reviewers:
Jarin
CC:
v8-reviews_googlegroups.com, Benedikt Meurer
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Better and more sane support for tail calls * Limit triggering of tail calls to explicit use of a new inline runtime function %_TailCall. %_TailCall works just like %_Call except for using tail-calling mechanics (currently only in TF). * Remove hack that recognized some specific usages of %_Call and converted them into tail calls. * Support tail calls for all calls where the number of callee stack parameters is less than or equal to the number of caller stack parameters. * Use the gap resolver to swizzle parameters and registers to tail calls. BUG=v8:4076 LOG=n Committed: https://crrev.com/ff283f7ded84df5a5a77d088e37fd69cf6271a8c Cr-Commit-Position: refs/heads/master@{#31987}

Patch Set 1 #

Patch Set 2 : Tweaks #

Patch Set 3 : Platforms ports #

Patch Set 4 : Add comments #

Patch Set 5 : Rename tests #

Total comments: 10

Patch Set 6 : Review feedback #

Total comments: 2

Patch Set 7 : Review feedback #

Patch Set 8 : Rebase #

Patch Set 9 : Skip test in ignition configuration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -201 lines) Patch
M src/compiler/arm/code-generator-arm.cc View 1 2 3 chunks +9 lines, -3 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -3 lines 0 comments Download
M src/compiler/code-generator.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 3 chunks +12 lines, -3 lines 0 comments Download
M src/compiler/instruction-selector.h View 1 2 3 4 5 6 1 chunk +8 lines, -2 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 5 6 7 7 chunks +30 lines, -9 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -0 lines 0 comments Download
M src/compiler/linkage.h View 1 2 chunks +10 lines, -1 line 0 comments Download
M src/compiler/linkage.cc View 1 2 3 4 5 6 7 2 chunks +20 lines, -62 lines 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 2 3 chunks +16 lines, -4 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 2 3 4 5 6 7 3 chunks +16 lines, -4 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 5 6 7 3 chunks +12 lines, -3 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-function.cc View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
M test/mjsunit/call-runtime-tail.js View 1 2 3 4 1 chunk +0 lines, -82 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A + test/mjsunit/tail-call-intrinsic.js View 1 2 3 4 3 chunks +37 lines, -11 lines 0 comments Download
M test/unittests/compiler/linkage-tail-call-unittest.cc View 1 2 3 4 5 13 chunks +39 lines, -13 lines 0 comments Download

Messages

Total messages: 24 (11 generated)
danno
PTAL
5 years, 1 month ago (2015-11-12 09:27:27 UTC) #2
Jarin
Several drive-by comments. https://codereview.chromium.org/1439613003/diff/80001/src/compiler/instruction-selector.cc File src/compiler/instruction-selector.cc (right): https://codereview.chromium.org/1439613003/diff/80001/src/compiler/instruction-selector.cc#newcode491 src/compiler/instruction-selector.cc:491: buffer->descriptor->GetInputLocation(index), stack_param_delta); Replace 'buffer->descriptor->GetInputLocation(index)' with 'location' ...
5 years, 1 month ago (2015-11-12 13:45:12 UTC) #5
danno
Feedback addressed. Please take another look. https://codereview.chromium.org/1439613003/diff/80001/src/compiler/instruction-selector.cc File src/compiler/instruction-selector.cc (right): https://codereview.chromium.org/1439613003/diff/80001/src/compiler/instruction-selector.cc#newcode491 src/compiler/instruction-selector.cc:491: buffer->descriptor->GetInputLocation(index), stack_param_delta); On ...
5 years, 1 month ago (2015-11-13 10:04:17 UTC) #6
Jarin
Nit. https://codereview.chromium.org/1439613003/diff/100001/src/compiler/instruction-selector.h File src/compiler/instruction-selector.h (right): https://codereview.chromium.org/1439613003/diff/100001/src/compiler/instruction-selector.h#newcode171 src/compiler/instruction-selector.h:171: }; Please use "typedef base::Flags<CallBufferFlags> CallBufferInitFlags;" and then ...
5 years, 1 month ago (2015-11-13 10:42:49 UTC) #7
danno
PTAL https://codereview.chromium.org/1439613003/diff/100001/src/compiler/instruction-selector.h File src/compiler/instruction-selector.h (right): https://codereview.chromium.org/1439613003/diff/100001/src/compiler/instruction-selector.h#newcode171 src/compiler/instruction-selector.h:171: }; On 2015/11/13 10:42:49, Jarin wrote: > Please ...
5 years, 1 month ago (2015-11-13 11:54:11 UTC) #8
Jarin
LGTM. Thanks!
5 years, 1 month ago (2015-11-13 13:29:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1439613003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1439613003/120001
5 years, 1 month ago (2015-11-13 14:29:12 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/9873) v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 1 month ago (2015-11-13 14:30:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1439613003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1439613003/140001
5 years, 1 month ago (2015-11-13 14:34:07 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel/builds/11704)
5 years, 1 month ago (2015-11-13 14:49:14 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1439613003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1439613003/160001
5 years, 1 month ago (2015-11-13 15:49:14 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 1 month ago (2015-11-13 16:08:16 UTC) #23
commit-bot: I haz the power
5 years, 1 month ago (2015-11-14 23:21:40 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/ff283f7ded84df5a5a77d088e37fd69cf6271a8c
Cr-Commit-Position: refs/heads/master@{#31987}

Powered by Google App Engine
This is Rietveld 408576698