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

Issue 130613003: Eliminatable CheckMaps replaced with if(true) or if(false). (Closed)

Created:
6 years, 11 months ago by Igor Sheludko
Modified:
6 years, 11 months ago
CC:
v8-dev
Visibility:
Public.

Description

Eliminatable CheckMaps replaced with if(true) or if(false). R=titzer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=18592

Patch Set 1 #

Total comments: 10

Patch Set 2 : Review notes applied #

Total comments: 4

Patch Set 3 : Review notes applied, rev.2 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -15 lines) Patch
M src/hydrogen.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 2 chunks +33 lines, -0 lines 1 comment Download
M src/hydrogen-check-elimination.cc View 1 2 2 chunks +19 lines, -4 lines 0 comments Download
M src/hydrogen-flow-engine.h View 1 2 2 chunks +13 lines, -10 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Igor Sheludko
PTAL
6 years, 11 months ago (2014-01-13 11:17:03 UTC) #1
titzer
https://codereview.chromium.org/130613003/diff/1/src/hydrogen-flow-engine.h File src/hydrogen-flow-engine.h (right): https://codereview.chromium.org/130613003/diff/1/src/hydrogen-flow-engine.h#newcode124 src/hydrogen-flow-engine.h:124: if (SkipNonDominatedBlock(root, block)) continue; You probably want a "if ...
6 years, 11 months ago (2014-01-13 17:26:56 UTC) #2
titzer
On 2014/01/13 17:26:56, titzer wrote: > https://codereview.chromium.org/130613003/diff/1/src/hydrogen-flow-engine.h > File src/hydrogen-flow-engine.h (right): > > https://codereview.chromium.org/130613003/diff/1/src/hydrogen-flow-engine.h#newcode124 > ...
6 years, 11 months ago (2014-01-13 17:53:56 UTC) #3
Igor Sheludko
https://codereview.chromium.org/130613003/diff/1/src/hydrogen-flow-engine.h File src/hydrogen-flow-engine.h (right): https://codereview.chromium.org/130613003/diff/1/src/hydrogen-flow-engine.h#newcode124 src/hydrogen-flow-engine.h:124: if (SkipNonDominatedBlock(root, block)) continue; On 2014/01/13 17:26:56, titzer wrote: ...
6 years, 11 months ago (2014-01-14 10:41:36 UTC) #4
titzer
https://codereview.chromium.org/130613003/diff/130001/src/hydrogen-flow-engine.h File src/hydrogen-flow-engine.h (right): https://codereview.chromium.org/130613003/diff/130001/src/hydrogen-flow-engine.h#newcode149 src/hydrogen-flow-engine.h:149: SetStateAt(succ, state); This is still not quite correct, because ...
6 years, 11 months ago (2014-01-14 13:40:32 UTC) #5
Igor Sheludko
https://codereview.chromium.org/130613003/diff/130001/src/hydrogen-flow-engine.h File src/hydrogen-flow-engine.h (right): https://codereview.chromium.org/130613003/diff/130001/src/hydrogen-flow-engine.h#newcode149 src/hydrogen-flow-engine.h:149: SetStateAt(succ, state); On 2014/01/14 13:40:32, titzer wrote: > This ...
6 years, 11 months ago (2014-01-14 15:28:00 UTC) #6
titzer
lgtm, please run the webkit tests that we have checked into V8 as well.
6 years, 11 months ago (2014-01-14 15:32:15 UTC) #7
Igor Sheludko
Committed patchset #3 manually as r18592 (presubmit successful).
6 years, 11 months ago (2014-01-14 16:06:48 UTC) #8
Jakob Kummerow
https://codereview.chromium.org/130613003/diff/210001/src/hydrogen.cc File src/hydrogen.cc (right): https://codereview.chromium.org/130613003/diff/210001/src/hydrogen.cc#newcode334 src/hydrogen.cc:334: end()->DeleteAndReplaceWith(end()->ActualValue()); As discussed offline, this is a bug. Some ...
6 years, 11 months ago (2014-01-15 10:30:19 UTC) #9
titzer
6 years, 11 months ago (2014-01-15 10:40:04 UTC) #10
Message was sent while issue was closed.
On 2014/01/15 10:30:19, Jakob wrote:
> https://codereview.chromium.org/130613003/diff/210001/src/hydrogen.cc
> File src/hydrogen.cc (right):
> 
>
https://codereview.chromium.org/130613003/diff/210001/src/hydrogen.cc#newcode334
> src/hydrogen.cc:334: end()->DeleteAndReplaceWith(end()->ActualValue());
> As discussed offline, this is a bug.
> 
> Some instructions define dependencies on control instructions (such as
> HCheckMaps) because they must be scheduled after the check (i.e. must not be
> hoisted past it). Replacing the control node input to such an instruction with
> the check's input value is hence invalid, as doing so removes the explicit
> scheduling dependency.
> (At least, I think that's the reason why this CL is causing test failures.)

Jakob is right, any uses of the control instruction need to be replaced with the
last successful check instruction (or the store that changes the map), so check
elimination must track the reason that it has determined the check to be
redundant.

Powered by Google App Engine
This is Rietveld 408576698