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

Issue 413903002: Subzero: Add a peephole to fuse cmpxchg w/ later cmp+branch. (Closed)

Created:
6 years, 5 months ago by jvoung (off chromium)
Modified:
6 years, 4 months ago
Reviewers:
Jim Stichnoth
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Add a peephole to fuse cmpxchg w/ later cmp+branch. The cmpxchg instruction already sets ZF for comparing the return value vs the expected value. So there is no need to compare eq again. Lots of pexes-in-the-wild have this pattern. Some compare against a constant, some compare against a variable. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3882 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=c820ddf

Patch Set 1 #

Patch Set 2 : split the test, formatting too #

Patch Set 3 : bail out of om1 more quickly #

Total comments: 5

Patch Set 4 : add comment #

Patch Set 5 : blank #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -63 lines) Patch
M crosstest/test_sync_atomic.h View 1 chunk +3 lines, -2 lines 0 comments Download
M crosstest/test_sync_atomic.cpp View 1 chunk +15 lines, -3 lines 0 comments Download
M crosstest/test_sync_atomic_main.cpp View 1 chunk +37 lines, -27 lines 0 comments Download
M src/IceCfgNode.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M src/IceTargetLowering.h View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 2 chunks +75 lines, -5 lines 0 comments Download
A tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll View 1 1 chunk +150 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll View 1 3 chunks +4 lines, -21 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jvoung (off chromium)
6 years, 5 months ago (2014-07-24 20:41:41 UTC) #1
Jim Stichnoth
https://codereview.chromium.org/413903002/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/413903002/diff/40001/src/IceTargetLoweringX8632.cpp#newcode2931 src/IceTargetLoweringX8632.cpp:2931: InstList::iterator I = Context.getCur(); Try to use LoweringContext instead ...
6 years, 5 months ago (2014-07-25 17:27:47 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/413903002/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/413903002/diff/40001/src/IceTargetLoweringX8632.cpp#newcode2931 src/IceTargetLoweringX8632.cpp:2931: InstList::iterator I = Context.getCur(); On 2014/07/25 17:27:47, stichnot wrote: ...
6 years, 4 months ago (2014-07-28 22:55:26 UTC) #3
Jim Stichnoth
lgtm https://codereview.chromium.org/413903002/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/413903002/diff/40001/src/IceTargetLoweringX8632.cpp#newcode2938 src/IceTargetLoweringX8632.cpp:2938: // There might be phi assignments right before ...
6 years, 4 months ago (2014-07-29 18:08:45 UTC) #4
jvoung (off chromium)
6 years, 4 months ago (2014-07-29 21:38:58 UTC) #5
Message was sent while issue was closed.
Committed patchset #5 manually as rc820ddf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698