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

Issue 2446543002: [turbofan] Support variable size argument popping in TF-generated functions (Closed)

Created:
4 years, 2 months ago by danno
Modified:
4 years, 1 month ago
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, v8-x87-ports_googlegroups.com, rmcilroy, v8-ppc-ports_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Support variable size argument removal in TF-generated functions This is preparation for using TF to create builtins that handle variable number of arguments and have to remove these arguments dynamically from the stack upon return. The gist of the changes: - Added a second argument to the Return node which specifies the number of stack slots to pop upon return in addition to those specified by the Linkage of the compiled function. - Removed Tail -> Non-Tail fallback in the instruction selector. Since TF now should handles all tail-call cases except where the return value type differs, this fallback was not really useful and in fact caused unexpected behavior with variable sized argument popping, since it wasn't possible to materialize a Return node with the right pop count from the TailCall without additional context. - Modified existing Return generation to pass a constant zero as the additional pop argument since the variable pop functionality LOG=N Committed: https://crrev.com/fe552636be3afd99210c991545e91fd705e4ee46 Cr-Commit-Position: refs/heads/master@{#40699}

Patch Set 1 #

Patch Set 2 : Fix ia32 #

Patch Set 3 : Fix x64 #

Patch Set 4 : Remove unused var #

Patch Set 5 : Fix MIPs #

Patch Set 6 : Fix builds #

Patch Set 7 : Fix x64 #

Patch Set 8 : Fix x64 #

Total comments: 2

Patch Set 9 : Fix mips64 #

Patch Set 10 : Fix MIPS #

Patch Set 11 : Fix MIPS again #

Patch Set 12 : Fix bugs #

Total comments: 15

Patch Set 13 : Review feedback #

Patch Set 14 : Fix tests and arm64 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+530 lines, -292 lines) Patch
M src/code-stubs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/arm/code-generator-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +22 lines, -9 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +26 lines, -9 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/code-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/code-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/code-generator.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/common-operator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +10 lines, -11 lines 0 comments Download
M src/compiler/common-operator-reducer.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +29 lines, -11 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +58 lines, -99 lines 0 comments Download
M src/compiler/js-inlining.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +21 lines, -8 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +21 lines, -8 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 chunk +28 lines, -5 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +22 lines, -1 line 0 comments Download
M src/compiler/tail-call-optimization.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -2 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +14 lines, -9 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +32 lines, -12 lines 0 comments Download
M test/cctest/compiler/graph-builder-tester.h View 1 chunk +3 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-js-typed-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-loop-analysis.cc View 7 chunks +13 lines, -6 lines 0 comments Download
M test/cctest/compiler/test-representation-change.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-run-native-calls.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-run-stubs.cc View 1 chunk +2 lines, -1 line 0 comments Download
M test/cctest/test-code-stub-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +56 lines, -0 lines 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M test/unittests/compiler/branch-elimination-unittest.cc View 5 chunks +12 lines, -8 lines 0 comments Download
M test/unittests/compiler/common-operator-reducer-unittest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M test/unittests/compiler/common-operator-unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/unittests/compiler/effect-control-linearizer-unittest.cc View 4 chunks +10 lines, -5 lines 0 comments Download
M test/unittests/compiler/escape-analysis-unittest.cc View 11 chunks +13 lines, -12 lines 0 comments Download
M test/unittests/compiler/graph-reducer-unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M test/unittests/compiler/instruction-selector-unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M test/unittests/compiler/int64-lowering-unittest.cc View 4 chunks +7 lines, -5 lines 0 comments Download
M test/unittests/compiler/loop-peeling-unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/unittests/compiler/scheduler-unittest.cc View 19 chunks +54 lines, -36 lines 0 comments Download
M test/unittests/compiler/tail-call-optimization-unittest.cc View 6 chunks +18 lines, -6 lines 0 comments Download

Messages

Total messages: 60 (48 generated)
danno
ptal https://codereview.chromium.org/2446543002/diff/140001/src/code-stubs.cc File src/code-stubs.cc (right): https://codereview.chromium.org/2446543002/diff/140001/src/code-stubs.cc#newcode2904 src/code-stubs.cc:2904: result.Bind(assembler->UndefinedConstant()); It's not a good idea to tail ...
4 years, 1 month ago (2016-10-25 06:43:32 UTC) #33
Michael Starzinger
Looking good from my end. Just a couple of nits. https://codereview.chromium.org/2446543002/diff/220001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/2446543002/diff/220001/src/compiler/ast-graph-builder.cc#newcode3780 ...
4 years, 1 month ago (2016-10-28 14:12:15 UTC) #34
danno
review feedback addressed, please take another look. https://codereview.chromium.org/2446543002/diff/220001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/2446543002/diff/220001/src/compiler/ast-graph-builder.cc#newcode3780 src/compiler/ast-graph-builder.cc:3780: Node* pop_node ...
4 years, 1 month ago (2016-10-31 10:06:40 UTC) #39
Michael Starzinger
Thanks! LGTM from my end. https://codereview.chromium.org/2446543002/diff/220001/src/compiler/instruction-selector.cc File src/compiler/instruction-selector.cc (right): https://codereview.chromium.org/2446543002/diff/220001/src/compiler/instruction-selector.cc#newcode1969 src/compiler/instruction-selector.cc:1969: value_locations[0] = pop_count->opcode() == ...
4 years, 1 month ago (2016-10-31 10:23:19 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2446543002/240001
4 years, 1 month ago (2016-10-31 16:51:34 UTC) #42
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 1 month ago (2016-10-31 16:53:44 UTC) #44
Michael Achenbach
A revert of this CL (patchset #13 id:240001) has been created in https://codereview.chromium.org/2473643002/ by machenbach@chromium.org. ...
4 years, 1 month ago (2016-11-02 07:21:22 UTC) #45
danno
Fixed arm64 and tests, relanding
4 years, 1 month ago (2016-11-02 13:13:01 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2446543002/260001
4 years, 1 month ago (2016-11-02 13:13:17 UTC) #54
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 1 month ago (2016-11-02 13:15:49 UTC) #56
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/5319b50c853c4213d825aa7cf620fde5d827f7eb Cr-Commit-Position: refs/heads/master@{#40678}
4 years, 1 month ago (2016-11-17 22:18:26 UTC) #58
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:19:20 UTC) #60
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/fe552636be3afd99210c991545e91fd705e4ee46
Cr-Commit-Position: refs/heads/master@{#40699}

Powered by Google App Engine
This is Rietveld 408576698