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

Issue 602083003: Fix scheduler to correctly schedule nested diamonds. (Closed)

Created:
6 years, 2 months ago by sigurds
Modified:
6 years, 2 months ago
CC:
v8-dev, Benedikt Meurer, Michael Starzinger
Project:
v8
Visibility:
Public.

Description

Fix scheduler to correctly schedule nested diamonds. The scheduler rewires control based on the last *control* node that appears in the schedule of a block. This is not sufficient to account for dependencies. This patch adds additional dependencies to floating control nodes. Given a floating control node A, every non-control dependency of every node B that depends on A is introduces as an additional dependency of A. This allows the scheduler to correctly schedule two diamonds A, B, if their only correct schedule is to schedule B into the ifTrue successor in A. TEST=cctest/test-scheduler/NestedFloatingDiamonds R=mstarzinger@chromium.org, titzer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=24561

Patch Set 1 #

Total comments: 5

Patch Set 2 : Addressing titzer's counter-example. #

Patch Set 3 : 2 Fixes #

Patch Set 4 : titzer's comments #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : Fix rebase bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -9 lines) Patch
M src/compiler/scheduler.h View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M src/compiler/scheduler.cc View 1 2 3 4 5 7 chunks +45 lines, -7 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 2 chunks +26 lines, -0 lines 0 comments Download
M test/cctest/compiler/test-scheduler.cc View 1 2 3 4 3 chunks +83 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
sigurds
PTAL
6 years, 2 months ago (2014-09-25 12:07:07 UTC) #1
titzer
https://codereview.chromium.org/602083003/diff/1/src/compiler/scheduler.cc File src/compiler/scheduler.cc (right): https://codereview.chromium.org/602083003/diff/1/src/compiler/scheduler.cc#newcode658 src/compiler/scheduler.cc:658: one_placed = true; So this basically matches the first ...
6 years, 2 months ago (2014-09-25 12:19:24 UTC) #2
titzer
https://codereview.chromium.org/602083003/diff/1/src/compiler/verifier.cc File src/compiler/verifier.cc (right): https://codereview.chromium.org/602083003/diff/1/src/compiler/verifier.cc#newcode274 src/compiler/verifier.cc:274: static bool Dominates(Schedule* schedule, Node* dominator, Node* dominee) { ...
6 years, 2 months ago (2014-09-26 10:44:39 UTC) #3
sigurds
Your concern was right; we now have unit-tests that expose the failure before the patch ...
6 years, 2 months ago (2014-09-26 11:35:24 UTC) #4
sigurds
I addressed the comments from our internal discussion.
6 years, 2 months ago (2014-09-26 13:43:41 UTC) #5
titzer
LGTM Willing to land as is, but this is pretty yucky. https://codereview.chromium.org/602083003/diff/60001/src/compiler/scheduler.cc File src/compiler/scheduler.cc (right): ...
6 years, 2 months ago (2014-10-07 07:48:26 UTC) #6
Michael Starzinger
LGTM. I haven't done a thorough review. But I am also fine with landing this ...
6 years, 2 months ago (2014-10-10 10:49:04 UTC) #8
sigurds
Committed patchset #6 (id:170001) manually as 24561 (presubmit successful).
6 years, 2 months ago (2014-10-13 13:07:59 UTC) #9
sigurds
6 years, 2 months ago (2014-10-13 13:08:18 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/602083003/diff/60001/src/compiler/scheduler.cc
File src/compiler/scheduler.cc (right):

https://codereview.chromium.org/602083003/diff/60001/src/compiler/scheduler.c...
src/compiler/scheduler.cc:462: if
(OperatorProperties::IsBasicBlockBegin(to->op()) &&
On 2014/10/07 07:48:26, titzer wrote:
> I think this should only be EffectPhi and Phi, and floating_control and
> connected_control should be mutually exclusive.

I'm doing the IsBasicBlockBegin check to make sure to add the additional
dependencies only once per (Effect)Phi.

Powered by Google App Engine
This is Rietveld 408576698