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

Issue 1389373002: [turbofan] Create ExplicitOperands to specify operands without virtual registers (Closed)

Created:
5 years, 2 months ago by danno
Modified:
5 years, 1 month ago
Reviewers:
*Mircea Trofin, *Jarin
CC:
Benedikt Meurer, 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] Create ExplicitOperands to specify operands without virtual registers Up until now, if one wanted to specify an explicit stack location or register as an operand for an instruction, it had to also be explicitly associated with a virtual register as a so-called FixedRegister or FixedStackSlot. For the implementation of tail calls, the plan is to use the gap resolver needs to shuffle stack locations from the caller to the tail-called callee. In order to do this, it must be possible to explicitly address operand locations on the stack that are not associated with virtual registers. This CL introduces ExplictOperands, which can specify a specific register or stack location that is not associated with virtual register. This will allow tail calls to specify the target locations for the necessary stack moves in the gap for the tail call without the core register allocation having to know about the target of the stack moves at all. In the process this CL: * creates a new Operand kind, ExplicitOperand, with which instructions can specify register and stack slots without an associated virtual register. * creates a LocationOperand class from which AllocatedOperand and ExplicitOperand are derived and provides a common interface to get Register, DoubleRegister and spill slot information. * removes RegisterOperand, DoubleRegisterOperand, StackSlotOperand and DoubleStackSlotOperand, they are subsumed by LocationOperand. * addresses a cleanup TODO in AllocatedOperand to reduce the redundancy of AllocatedOperand::Kind by using machine_type() to determine if an operand corresponds to a general purpose or double register. BUG=v8:4076 LOG=n Committed: https://crrev.com/f1aa556278cf833960bd8f9ed96d4168f94478c3 Cr-Commit-Position: refs/heads/master@{#31603}

Patch Set 1 #

Patch Set 2 : Test #

Patch Set 3 : Merge to ToT #

Patch Set 4 : Latest #

Patch Set 5 : Tweaks #

Total comments: 8

Patch Set 6 : Merge with latest #

Patch Set 7 : Review feedback #

Patch Set 8 : Add and tweak tests #

Total comments: 2

Patch Set 9 : Review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -195 lines) Patch
M src/compiler/code-generator.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -8 lines 0 comments Download
M src/compiler/code-generator-impl.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M src/compiler/gap-resolver.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/instruction.h View 1 2 3 4 5 6 7 8 7 chunks +118 lines, -86 lines 0 comments Download
M src/compiler/instruction.cc View 1 2 3 4 5 6 7 8 4 chunks +28 lines, -20 lines 0 comments Download
M src/compiler/instruction-selector-impl.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/move-optimizer.cc View 1 2 3 4 5 6 3 chunks +7 lines, -7 lines 0 comments Download
M src/compiler/register-allocator.cc View 1 2 3 4 5 6 7 8 12 chunks +31 lines, -42 lines 0 comments Download
M src/compiler/register-allocator-verifier.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/register-allocator-verifier.cc View 1 2 3 4 5 6 8 chunks +20 lines, -10 lines 0 comments Download
M test/cctest/compiler/test-gap-resolver.cc View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -14 lines 0 comments Download
M test/cctest/compiler/test-jump-threading.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M test/unittests/compiler/instruction-sequence-unittest.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M test/unittests/compiler/move-optimizer-unittest.cc View 1 2 3 4 5 6 2 chunks +25 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
danno
PTAL
5 years, 2 months ago (2015-10-15 14:27:44 UTC) #2
Mircea Trofin
https://codereview.chromium.org/1389373002/diff/80001/src/compiler/instruction.cc File src/compiler/instruction.cc (right): https://codereview.chromium.org/1389373002/diff/80001/src/compiler/instruction.cc#newcode108 src/compiler/instruction.cc:108: case InstructionOperand::EXPLICIT: Would it help debugging if Explicit had ...
5 years, 2 months ago (2015-10-15 15:05:38 UTC) #4
Jarin
The code looks good, but it really needs to have test coverage. At least the ...
5 years, 2 months ago (2015-10-16 09:25:06 UTC) #5
danno
Please take another look. Feedback addressed. Test coverage added for move optimizer and gap-resolver, none ...
5 years, 2 months ago (2015-10-23 08:07:50 UTC) #8
danno
On 2015/10/23 at 08:07:50, danno wrote: > Please take another look. Feedback addressed. Test coverage ...
5 years, 1 month ago (2015-10-26 13:35:04 UTC) #9
Jarin
lgtm with a question. https://codereview.chromium.org/1389373002/diff/140001/src/compiler/instruction-selector-impl.h File src/compiler/instruction-selector-impl.h (right): https://codereview.chromium.org/1389373002/diff/140001/src/compiler/instruction-selector-impl.h#newcode125 src/compiler/instruction-selector-impl.h:125: return ExplicitOperand(LocationOperand::REGISTER, machine_type, reg.code()); Maybe ...
5 years, 1 month ago (2015-10-26 13:37:02 UTC) #10
Mircea Trofin
On 2015/10/26 13:37:02, Jarin wrote: > lgtm with a question. > > https://codereview.chromium.org/1389373002/diff/140001/src/compiler/instruction-selector-impl.h > File ...
5 years, 1 month ago (2015-10-26 21:35:07 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1389373002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1389373002/160001
5 years, 1 month ago (2015-10-27 13:15:47 UTC) #14
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 1 month ago (2015-10-27 13:26:39 UTC) #15
commit-bot: I haz the power
5 years, 1 month ago (2015-10-27 13:27:06 UTC) #16
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f1aa556278cf833960bd8f9ed96d4168f94478c3
Cr-Commit-Position: refs/heads/master@{#31603}

Powered by Google App Engine
This is Rietveld 408576698