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

Issue 1904233002: Subzero: Fix over-aggressive bool folding. (Closed)

Created:
4 years, 8 months ago by Jim Stichnoth
Modified:
4 years, 8 months ago
Reviewers:
Eric Holk, Karl, sehr, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero: Fix over-aggressive bool folding. The problem is that bitcode like this: %cond = cmp %var, [mem] store ..., mem br cond, target1, target2 would be bool-folded into this: //deleted cmp store ..., mem br (%var==[mem]), target1, target2 And if the memory operands point to the same location, results are incorrect. In addition to stores, this is a problem for RMW instructions, and most call instructions which could perform stores before returning. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4370 R=eholk@chromium.org, jpp@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=f1f773dd2c9c7118e07caa61d580bdba4447c25c

Patch Set 1 #

Total comments: 24

Patch Set 2 : Code review changes #

Patch Set 3 : More code review changes #

Patch Set 4 : Hack for pure virtual method #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -39 lines) Patch
M src/IceInst.h View 1 2 3 27 chunks +38 lines, -1 line 0 comments Download
M src/IceInst.cpp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceIntrinsics.h View 1 1 chunk +5 lines, -1 line 0 comments Download
M src/IceIntrinsics.cpp View 12 chunks +45 lines, -35 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 chunks +42 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/bool-folding.ll View 1 chunk +52 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
Jim Stichnoth
4 years, 8 months ago (2016-04-21 21:50:05 UTC) #3
Eric Holk
lgtm otherwise. https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h File src/IceInst.h (right): https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h#newcode268 src/IceInst.h:268: bool isMemoryWrite() const final { return false; ...
4 years, 8 months ago (2016-04-21 22:09:44 UTC) #4
John
lgtm LGTM, but please explain invalidateProducersOnStore... :) https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h File src/IceInst.h (right): https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h#newcode142 src/IceInst.h:142: virtual bool ...
4 years, 8 months ago (2016-04-21 22:50:02 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h File src/IceInst.h (right): https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h#newcode268 src/IceInst.h:268: bool isMemoryWrite() const final { return false; } On ...
4 years, 8 months ago (2016-04-21 22:50:29 UTC) #6
Eric Holk
still lgtm https://codereview.chromium.org/1904233002/diff/1/src/IceIntrinsics.cpp File src/IceIntrinsics.cpp (right): https://codereview.chromium.org/1904233002/diff/1/src/IceIntrinsics.cpp#newcode75 src/IceIntrinsics.cpp:75: INTRIN(AtomicLoad, SideEffects_T, ReturnsTwice_F, MemoryWrite_T), \ On 2016/04/21 ...
4 years, 8 months ago (2016-04-21 23:03:28 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h File src/IceInst.h (right): https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h#newcode142 src/IceInst.h:142: virtual bool isMemoryWrite() const { return true; } On ...
4 years, 8 months ago (2016-04-21 23:31:36 UTC) #8
Jim Stichnoth
https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h File src/IceInst.h (right): https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h#newcode142 src/IceInst.h:142: virtual bool isMemoryWrite() const { return true; } On ...
4 years, 8 months ago (2016-04-21 23:32:41 UTC) #9
John
On 2016/04/21 23:32:41, stichnot wrote: > https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h > File src/IceInst.h (right): > > https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h#newcode142 > ...
4 years, 8 months ago (2016-04-21 23:33:16 UTC) #10
John
lgtm still lgtm
4 years, 8 months ago (2016-04-21 23:33:25 UTC) #11
Jim Stichnoth
On 2016/04/21 23:33:16, John wrote: > On 2016/04/21 23:32:41, stichnot wrote: > > https://codereview.chromium.org/1904233002/diff/1/src/IceInst.h > ...
4 years, 8 months ago (2016-04-21 23:43:38 UTC) #12
Jim Stichnoth
4 years, 8 months ago (2016-04-21 23:54:37 UTC) #14
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
f1f773dd2c9c7118e07caa61d580bdba4447c25c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698