[PATCH] Add hooks for emitLeading/TrailingFence in TargetLowering
JF Bastien
jfb at chromium.org
Wed Aug 20 22:01:07 PDT 2014
================
Comment at: include/llvm/Target/TargetLowering.h:962
@@ +961,3 @@
+ /// AtomicRMW/AtomicCmpXchg/AtomicStore/AtomicLoad.
+ /// RMW and CAS set both IsStore and IsLoad to true.
+ /// Backends without insertFencesForAtomic() should have a no-op here
----------------
I'm not sure if LLVM uses CAS in comments? It would be better to stay consistent can say CmpXchg.
================
Comment at: include/llvm/Target/TargetLowering.h:963
@@ +962,3 @@
+ /// RMW and CAS set both IsStore and IsLoad to true.
+ /// Backends without insertFencesForAtomic() should have a no-op here
+ virtual void emitLeadingFence(IRBuilder<> &Builder, AtomicOrdering Ord,
----------------
Does this mean that the base implementation below can:
```
assert(!getInsertFencesForAtomic());
```
?
The comment should also `s/insertFencesForAtomic/getInsertFencesForAtomic/`
http://reviews.llvm.org/D4959
More information about the llvm-commits
mailing list