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

Issue 1426943010: [turbofan] Spill rsi and rdi in their existing locations. (Closed)

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

Description

[turbofan] Spill rsi and rdi in their existing locations. We push the context and the js function onto the stack as part of the frame construction. The register allocator is presented with virtual registers for the above as defined from their corresponding registers. It then goes on to spilling them somewhere else on the stack. This means each function spends two redundant spills and two unnecessary stack slots. This change addresses this issue. We present these parameters (context and function) to the register allocator as an UnallocatedOperand having a "secondary storage". The secondary storage is then associated to the live range as its spill operand. We capture the definition of the live range so that we can then commit the spill (in this case, eliminate) through a variation of the mechanics of the CommitAssignment phase. The register allocator validator also needed update to understand UnallocatedOperands with a secondary storage. The change renames the SpillAtDefinitionList and related APIs to better capture their intent - the old names suggested spills happened upon calling. In reality, potential spill locations were thus recorded, and later committed (or not, in certain cases) after register allocation. BUG=v8:4548 LOG=n Committed: https://crrev.com/20f3a0778299c0fd0c6e7ce955a14d800973c152 Cr-Commit-Position: refs/heads/master@{#31988}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 8

Patch Set 9 : #

Total comments: 2

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -40 lines) Patch
M src/compiler/frame.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/instruction.h View 5 6 7 8 3 chunks +18 lines, -1 line 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -3 lines 0 comments Download
M src/compiler/instruction-selector-impl.h View 5 6 7 8 2 chunks +20 lines, -0 lines 0 comments Download
M src/compiler/linkage.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/linkage.cc View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -0 lines 0 comments Download
M src/compiler/register-allocator.h View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -9 lines 0 comments Download
M src/compiler/register-allocator.cc View 1 2 3 4 5 6 7 8 12 chunks +37 lines, -23 lines 0 comments Download
M src/compiler/register-allocator-verifier.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/register-allocator-verifier.cc View 1 2 3 4 5 6 7 8 9 4 chunks +24 lines, -3 lines 0 comments Download

Messages

Total messages: 22 (11 generated)
Jarin
On 2015/11/11 05:20:36, Mircea Trofin wrote: > Patchset #4 (id:80001) has been deleted Nice, it ...
5 years, 1 month ago (2015-11-11 09:02:21 UTC) #3
Mircea Trofin
5 years, 1 month ago (2015-11-12 03:23:49 UTC) #6
Jarin
I am not sure about this solution; I think I liked your original version better. ...
5 years, 1 month ago (2015-11-12 12:08:33 UTC) #9
Mircea Trofin
I was also a bit unsure about some aspects of this design. In particular, if ...
5 years, 1 month ago (2015-11-12 18:01:35 UTC) #10
Mircea Trofin
5 years, 1 month ago (2015-11-12 23:13:41 UTC) #14
Mircea Trofin
5 years, 1 month ago (2015-11-12 23:13:44 UTC) #15
Jarin
Thanks for the explanation. lgtm. https://codereview.chromium.org/1426943010/diff/210011/src/compiler/register-allocator-verifier.h File src/compiler/register-allocator-verifier.h (right): https://codereview.chromium.org/1426943010/diff/210011/src/compiler/register-allocator-verifier.h#newcode40 src/compiler/register-allocator-verifier.h:40: kDualLocation I am wondering ...
5 years, 1 month ago (2015-11-13 15:54:39 UTC) #16
Mircea Trofin
https://codereview.chromium.org/1426943010/diff/210011/src/compiler/register-allocator-verifier.h File src/compiler/register-allocator-verifier.h (right): https://codereview.chromium.org/1426943010/diff/210011/src/compiler/register-allocator-verifier.h#newcode40 src/compiler/register-allocator-verifier.h:40: kDualLocation On 2015/11/13 15:54:39, Jarin wrote: > I am ...
5 years, 1 month ago (2015-11-13 16:07:18 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1426943010/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1426943010/250001
5 years, 1 month ago (2015-11-13 16:07:42 UTC) #20
commit-bot: I haz the power
Committed patchset #10 (id:250001)
5 years, 1 month ago (2015-11-13 16:34:27 UTC) #21
commit-bot: I haz the power
5 years, 1 month ago (2015-11-14 23:21:42 UTC) #22
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/20f3a0778299c0fd0c6e7ce955a14d800973c152
Cr-Commit-Position: refs/heads/master@{#31988}

Powered by Google App Engine
This is Rietveld 408576698