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

Issue 791053006: Add support for acquire, release, and acq_rel memory ordering in PNaCl (Closed)

Created:
5 years, 11 months ago by JF
Modified:
5 years, 11 months ago
Reviewers:
Jim Stichnoth
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add support for acquire, release, and acq_rel memory ordering in PNaCl PNaCl currently upgrades all atomic operations to seq_cst. As discussed in: https://groups.google.com/forum/#!topic/native-client-dev/wh1jEr9nsfk PNaCl should support more than just seq_cst memory ordering to offer full access to the hardware's capabilities. For now we're still holding off on comsume ordering (which no compiler implements) and relaxed ordering (which is highly desirable performance-wise but has unsolved theoretical issues with out-of-thin-air values). BUG= https://code.google.com/p/nativeclient/issues/detail?id=4029 R=stichnot@chromium.org TEST= make check Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=9dd1dea7a54652afee2582c8d5686a16feb406fa

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix rewrite of cmpxchg with acq_rel success ordering; test. #

Patch Set 3 : LLVM 3.5 added failure ordering to cmpxchg, update the test accordingly. #

Patch Set 4 : Test cmpxchg intrinsic resolution. #

Patch Set 5 : Add an atomic ABI test for cmpxchg. #

Patch Set 6 : Intrinsics can't have undef ptr operand. #

Patch Set 7 : Fix a few bugs. #

Patch Set 8 : Add missing tests. #

Patch Set 9 : Fix test. #

Patch Set 10 : Fix typo in enum numbering. #

Total comments: 4

Patch Set 11 : Move _start around. #

Patch Set 12 : Nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+799 lines, -70 lines) Patch
M lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp View 1 2 3 4 5 6 1 chunk +74 lines, -16 lines 0 comments Download
M lib/Transforms/NaCl/RewriteAtomics.cpp View 1 2 3 4 5 6 4 chunks +24 lines, -5 lines 0 comments Download
A test/NaCl/PNaClABI/abi-atomics.ll View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +535 lines, -0 lines 0 comments Download
M test/Transforms/NaCl/atomic/atomic_others.ll View 1 2 3 4 5 6 2 chunks +78 lines, -7 lines 0 comments Download
M test/Transforms/NaCl/atomic/lock_.ll View 4 chunks +4 lines, -8 lines 0 comments Download
M test/Transforms/NaCl/resolve-pnacl-intrinsics.ll View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +84 lines, -34 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
JF
5 years, 11 months ago (2015-01-07 01:12:38 UTC) #1
JF
I'm not super satisfied with the testing yet, but I think that the bulk of ...
5 years, 11 months ago (2015-01-07 01:13:40 UTC) #2
Jim Stichnoth
Will you be adding tests of architecture-specific lowering for these new options? https://codereview.chromium.org/791053006/diff/1/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp File lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp ...
5 years, 11 months ago (2015-01-07 21:21:01 UTC) #3
JF
> Will you be adding tests of architecture-specific lowering for > these new options? I ...
5 years, 11 months ago (2015-01-07 21:33:57 UTC) #4
Jim Stichnoth
On 2015/01/07 21:33:57, JF wrote: > > Will you be adding tests of architecture-specific lowering ...
5 years, 11 months ago (2015-01-07 23:26:59 UTC) #5
JF
> That all sounds good. I guess I'll wait to see the cmpxchg tests. I ...
5 years, 11 months ago (2015-01-08 00:25:09 UTC) #6
JF
On 2015/01/08 00:25:09, JF wrote: > > That all sounds good. I guess I'll wait ...
5 years, 11 months ago (2015-01-08 01:08:24 UTC) #7
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/791053006/diff/180001/test/NaCl/PNaClABI/abi-atomics.ll File test/NaCl/PNaClABI/abi-atomics.ll (right): https://codereview.chromium.org/791053006/diff/180001/test/NaCl/PNaClABI/abi-atomics.ll#newcode3 test/NaCl/PNaClABI/abi-atomics.ll:3: declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) ...
5 years, 11 months ago (2015-01-08 19:29:25 UTC) #8
JF
Tree is currently closed. Will commit when it's open. https://codereview.chromium.org/791053006/diff/180001/test/NaCl/PNaClABI/abi-atomics.ll File test/NaCl/PNaClABI/abi-atomics.ll (right): https://codereview.chromium.org/791053006/diff/180001/test/NaCl/PNaClABI/abi-atomics.ll#newcode3 test/NaCl/PNaClABI/abi-atomics.ll:3: ...
5 years, 11 months ago (2015-01-08 19:36:25 UTC) #9
JF
Committed patchset #12 (id:220001) manually as 9dd1dea7a54652afee2582c8d5686a16feb406fa (presubmit successful).
5 years, 11 months ago (2015-01-08 20:20:50 UTC) #10
JF
5 years, 11 months ago (2015-01-20 22:15:13 UTC) #11
Message was sent while issue was closed.
Note that this CL was slightly changed in:
  https://codereview.chromium.org/857403002

Powered by Google App Engine
This is Rietveld 408576698