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

Issue 2030463003: [turbofan] Fix phi-hinting problem with deferred blocks (Closed)

Created:
4 years, 6 months ago by danno
Modified:
4 years, 6 months ago
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] Fix phi-hinting problem with deferred blocks Previously, turbofan selected the gap use from first predecessor block when hinting a phi, unless that block was deferred, in which case the gap move from the first non-deferred predecessor block was chosen. This strategy didn't guarantee that an important invariant was maintained: the predecessor blocks chosen for hinting phis must preceed the phi's block in the rpo ordering. In most cases the strategy worked, since graphs generated by the AstGraphBuilder and existing stubs just happened to always generate schedules where this rpo ordering property for the first predecessor block, but it is quite possible to generate a code stub by hand that doesn't have this property (see included test case). After this CL, the allocator chooses either the the first non-deferred "rpo-preceeding" block to be the hinting block, or the first deferred "rpo-preceeding" block if that doesn't exist. In all previously-existing code, this behavior is the same as the original algorithm, but has the benefit of not failing in the register allocator in hand-crafted stubs where all the "rpo-preceeding" predecessors are all in deferred code. Committed: https://crrev.com/afb0e7a4bded2b0d79558c1acdb039cb8955220c Cr-Commit-Position: refs/heads/master@{#36689}

Patch Set 1 #

Patch Set 2 : Tweaks #

Total comments: 9

Patch Set 3 : Review feedback #

Patch Set 4 : Rebase #

Patch Set 5 : Feedback #

Patch Set 6 : Fix stuff #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -12 lines) Patch
M src/compiler/register-allocator.cc View 1 2 3 4 1 chunk +13 lines, -12 lines 0 comments Download
M test/cctest/test-code-stub-assembler.cc View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
danno
PTAL
4 years, 6 months ago (2016-06-01 12:32:20 UTC) #2
Mircea Trofin
LGTM, after comments are addressed. https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc#newcode2188 src/compiler/register-allocator.cc:2188: // in the rpo ...
4 years, 6 months ago (2016-06-01 15:02:58 UTC) #3
danno
please take another look https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc#newcode2188 src/compiler/register-allocator.cc:2188: // in the rpo ordering. ...
4 years, 6 months ago (2016-06-02 01:29:38 UTC) #4
Mircea Trofin
lgtm https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc#newcode2196 src/compiler/register-allocator.cc:2196: if (!predecessor_block->IsDeferred()) break; On 2016/06/02 01:29:37, danno wrote: ...
4 years, 6 months ago (2016-06-02 01:39:51 UTC) #5
Mircea Trofin
https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/2030463003/diff/20001/src/compiler/register-allocator.cc#newcode2188 src/compiler/register-allocator.cc:2188: // in the rpo ordering. Prefer non-deferred blocks. On ...
4 years, 6 months ago (2016-06-02 01:42:43 UTC) #6
danno
The rpo order was always an implicit requirement (see the new comment), and we just ...
4 years, 6 months ago (2016-06-02 13:17:06 UTC) #7
danno
On 2016/06/02 13:17:06, danno wrote: > The rpo order was always an implicit requirement (see ...
4 years, 6 months ago (2016-06-02 15:17:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2030463003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2030463003/80001
4 years, 6 months ago (2016-06-02 15:17:58 UTC) #11
Mircea Trofin
On 2016/06/02 15:17:32, danno wrote: > On 2016/06/02 13:17:06, danno wrote: > > The rpo ...
4 years, 6 months ago (2016-06-02 15:18:31 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/16393)
4 years, 6 months ago (2016-06-02 15:20:48 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2030463003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2030463003/120001
4 years, 6 months ago (2016-06-02 20:32:38 UTC) #17
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 6 months ago (2016-06-02 20:34:02 UTC) #18
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 20:34:29 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/afb0e7a4bded2b0d79558c1acdb039cb8955220c
Cr-Commit-Position: refs/heads/master@{#36689}

Powered by Google App Engine
This is Rietveld 408576698