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

Issue 1460183002: [turbofan] Add general support for sp-based frame access (Closed)

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

Description

[turbofan] Add general support for sp-based frame access Some highlights of this CL: * Refactor the mutable state out of Frame into FrameAccessState, which is maintained and updated during code generation to record whether sp- or fp-based frame access is currently active and how deep the stack on top of the frame is. * The operand resultion in linkage.cc now uses FrameAccessState to determine how to generate frame-accessing operands. * Update all platforms to accurately track additionally pushed stack slots (e.g. arguments for calls) in the FrameAccessState. * Add a flag, --turbo_sp_frame_access, which forces all frame access to be sp-based whenever possible. This will likely never be used in production, but for testing it's useful in verifying that the stack-tracking of each platform maintained in the FrameAccessState is correct. * Use sp-based frame access for gap resolving before tail calls. This will allow for slightly more efficient restoration of the frame pointer in the tail call in a later CL. * Remove most ad hoc groping into CallDescriptors to determine if a frame is needed, instead consistently use predicates like needs_frame(), IsCFunctionCall() and IsJSFunctionCall(). BUG=v8:4076 LOG=n Committed: https://crrev.com/51669873694ed266ea06a2726f87138374eea1e7 Cr-Commit-Position: refs/heads/master@{#32234}

Patch Set 1 #

Patch Set 2 : Correct diff #

Patch Set 3 : Refactor #

Patch Set 4 : Fix arm64 #

Total comments: 6

Patch Set 5 : Port to x64 #

Patch Set 6 : All platforms #

Patch Set 7 : Latest ports #

Patch Set 8 : All platforms #

Total comments: 8

Patch Set 9 : Address reviewer feedback #

Total comments: 1

Patch Set 10 : Last comment addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -144 lines) Patch
M src/compiler/arm/code-generator-arm.cc View 1 2 3 4 5 6 7 8 13 chunks +21 lines, -10 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 2 3 4 5 6 7 8 12 chunks +20 lines, -18 lines 0 comments Download
M src/compiler/code-generator.h View 1 2 3 4 5 6 7 8 5 chunks +8 lines, -7 lines 0 comments Download
M src/compiler/code-generator.cc View 1 2 3 4 6 7 2 chunks +5 lines, -3 lines 0 comments Download
M src/compiler/code-generator-impl.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/frame.h View 1 2 3 4 5 6 7 8 8 chunks +61 lines, -29 lines 0 comments Download
M src/compiler/frame.cc View 1 2 3 4 5 6 7 8 1 chunk +30 lines, -3 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 2 3 4 5 6 7 8 15 chunks +40 lines, -18 lines 0 comments Download
M src/compiler/linkage.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -6 lines 0 comments Download
M src/compiler/linkage.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -18 lines 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 2 3 4 5 6 7 8 12 chunks +22 lines, -10 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 2 3 4 5 6 7 8 12 chunks +22 lines, -10 lines 0 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 5 6 7 8 12 chunks +23 lines, -10 lines 0 comments Download
M src/flag-definitions.h View 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (12 generated)
Benedikt Meurer
https://codereview.chromium.org/1460183002/diff/60001/src/compiler/linkage.h File src/compiler/linkage.h (right): https://codereview.chromium.org/1460183002/diff/60001/src/compiler/linkage.h#newcode357 src/compiler/linkage.h:357: FrameAccessState* frame_access_state) const; Nit: pass as const* or const&. ...
5 years, 1 month ago (2015-11-20 09:53:10 UTC) #3
danno
Feedback addressed, PTAL https://codereview.chromium.org/1460183002/diff/60001/src/compiler/pipeline.cc File src/compiler/pipeline.cc (right): https://codereview.chromium.org/1460183002/diff/60001/src/compiler/pipeline.cc#newcode277 src/compiler/pipeline.cc:277: descriptor->kind() == CallDescriptor::kCallAddress; On 2015/11/20 09:53:10, ...
5 years, 1 month ago (2015-11-23 14:35:22 UTC) #8
Mircea Trofin
On 2015/11/23 14:35:22, danno wrote: > Feedback addressed, PTAL > > https://codereview.chromium.org/1460183002/diff/60001/src/compiler/pipeline.cc > File src/compiler/pipeline.cc ...
5 years, 1 month ago (2015-11-23 16:41:57 UTC) #10
titzer
https://codereview.chromium.org/1460183002/diff/140001/src/compiler/code-generator.h File src/compiler/code-generator.h (right): https://codereview.chromium.org/1460183002/diff/140001/src/compiler/code-generator.h#newcode8 src/compiler/code-generator.h:8: #include "src/compiler/frame-access-state.h" You don't need this include if you ...
5 years, 1 month ago (2015-11-23 20:00:54 UTC) #12
danno
Feedback addressed. Apropos testing: the purpose of the turbo_sp_frame_access flag is to allow the sp-based ...
5 years ago (2015-11-24 12:02:00 UTC) #13
Benedikt Meurer
I think it's fine wrt. testing and benchmarks. The interpreter and code stubs should start ...
5 years ago (2015-11-24 15:37:07 UTC) #14
Mircea Trofin
On 2015/11/24 15:37:07, Benedikt Meurer wrote: > I think it's fine wrt. testing and benchmarks. ...
5 years ago (2015-11-24 16:18:09 UTC) #15
titzer
LGTM too https://codereview.chromium.org/1460183002/diff/160001/src/compiler/linkage.h File src/compiler/linkage.h (right): https://codereview.chromium.org/1460183002/diff/160001/src/compiler/linkage.h#newcode26 src/compiler/linkage.h:26: class FrameAccessState; I think you can drop ...
5 years ago (2015-11-24 17:45:57 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1460183002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1460183002/160001
5 years ago (2015-11-24 17:46:46 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1460183002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1460183002/180001
5 years ago (2015-11-24 21:39:52 UTC) #22
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years ago (2015-11-24 22:53:53 UTC) #23
commit-bot: I haz the power
5 years ago (2015-11-24 22:54:02 UTC) #24
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/51669873694ed266ea06a2726f87138374eea1e7
Cr-Commit-Position: refs/heads/master@{#32234}

Powered by Google App Engine
This is Rietveld 408576698