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

Issue 1000883003: [turbofan] Remove unused diamonds during control reduction. (Closed)

Created:
5 years, 9 months ago by Benedikt Meurer
Modified:
5 years, 9 months ago
Reviewers:
Jarin, brucedawson
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Remove unused diamonds during control reduction. A diamond is unused if the Merge node has no Phi/EffectPhi uses, exactly two inputs, one IfTrue and one IfFalse, which have the same Branch control input and no other uses except for the Merge. In this case the diamond can safely be removed. R=jarin@chromium.org Committed: https://crrev.com/b5197ea478e37e4629ec49348ce3a11d0ec15cb1 Cr-Commit-Position: refs/heads/master@{#27148}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -30 lines) Patch
M src/compiler/control-reducer.cc View 2 chunks +39 lines, -10 lines 2 comments Download
M test/cctest/compiler/test-control-reducer.cc View 8 chunks +17 lines, -20 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
Benedikt Meurer
5 years, 9 months ago (2015-03-12 07:28:04 UTC) #1
Benedikt Meurer
PTAL
5 years, 9 months ago (2015-03-12 07:30:45 UTC) #2
Jarin
lgtm
5 years, 9 months ago (2015-03-12 08:45:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1000883003/1
5 years, 9 months ago (2015-03-12 08:50:36 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 9 months ago (2015-03-12 09:02:13 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/b5197ea478e37e4629ec49348ce3a11d0ec15cb1 Cr-Commit-Position: refs/heads/master@{#27148}
5 years, 9 months ago (2015-03-12 09:02:34 UTC) #7
brucedawson
I opened a bug for this issue: crbug/467099 Also, but all-purpose bug for /analyze is ...
5 years, 9 months ago (2015-03-13 18:38:21 UTC) #9
Jarin
https://codereview.chromium.org/1000883003/diff/1/src/compiler/control-reducer.cc File src/compiler/control-reducer.cc (right): https://codereview.chromium.org/1000883003/diff/1/src/compiler/control-reducer.cc#newcode551 src/compiler/control-reducer.cc:551: node1->opcode() == IrOpcode::kIfFalse)) && On 2015/03/13 18:38:21, brucedawson wrote: ...
5 years, 9 months ago (2015-03-14 19:17:34 UTC) #10
Benedikt Meurer
5 years, 9 months ago (2015-03-16 06:24:18 UTC) #11
Message was sent while issue was closed.
On 2015/03/14 19:17:34, jarin wrote:
>
https://codereview.chromium.org/1000883003/diff/1/src/compiler/control-reduce...
> File src/compiler/control-reducer.cc (right):
> 
>
https://codereview.chromium.org/1000883003/diff/1/src/compiler/control-reduce...
> src/compiler/control-reducer.cc:551: node1->opcode() == IrOpcode::kIfFalse))
&&
> On 2015/03/13 18:38:21, brucedawson wrote:
> > This test looks wrong. This showed up as a new VC++ /analyze warning:
> > 
> > src\v8\src\objects.cc(2128) : warning C6237: (<zero> && <expression>) is
> always
> > zero.  <expression> is never evaluated and might have side effects.
> > 
> > I'm not sure what the  correct check is -- presumably either testing for
both
> > being kIfTrue or both being kIfFalse, or else checking for node0/1 being
> > kIfTrue/kIfFalse or node0/1 being kIfFalse/kIfTrue. Or maybe something else.
> 
> Good catch. This should test that node0/1 is kIfTrue/kIfFalse or
> kIfFalse/kIfTrue.

Indeed, great catch. Thanks.

Powered by Google App Engine
This is Rietveld 408576698