This is an archive of the discontinued LLVM Phabricator instance.

NFC: unify clang / LLVM atomic ordering
ClosedPublic

Authored by jfb on Apr 7 2016, 3:45 PM.

Details

Summary

This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433

Diff Detail

Event Timeline

jfb updated this revision to Diff 52965.Apr 7 2016, 3:45 PM
jfb retitled this revision from to NFC: unify clang / LLVM atomic ordering.
jfb updated this object.
jfb added reviewers: jyknight, reames.
jfb added a subscriber: llvm-commits.
rsmith added a subscriber: rsmith.Apr 7 2016, 4:02 PM
rsmith added inline comments.
include/llvm/Support/AtomicOrdering.h
24–35

Why does LLVM need to know about these? It seems like they're specific to the frontend. Is there some way in which they're not? (Is some upcoming change going to use these from LLVM?)

What happens if some C ABI picks different values?

jfb added inline comments.Apr 11 2016, 1:03 PM
include/llvm/Support/AtomicOrdering.h
24–35
jyknight accepted this revision.Apr 13 2016, 7:57 AM
jyknight edited edge metadata.

Please replace the function libcallAtomicModel in AtomicExpandPass.cpp with your new toCABI. Other than that, LGTM.

This revision is now accepted and ready to land.Apr 13 2016, 7:57 AM
jfb updated this revision to Diff 53900.Apr 15 2016, 9:04 AM
jfb edited edge metadata.
  • Update AtomicExpandPass
jfb updated this revision to Diff 53930.Apr 15 2016, 12:20 PM
  • Add validity check for conversions.
This revision was automatically updated to reflect the committed changes.