mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
Add hooks for emitLeading/TrailingFence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216232 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf165c36ee
commit
a204592582
@ -956,6 +956,26 @@ public:
|
|||||||
llvm_unreachable("Store conditional unimplemented on this target");
|
llvm_unreachable("Store conditional unimplemented on this target");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inserts in the IR a target-specific intrinsic specifying a fence.
|
||||||
|
/// It is called by AtomicExpandPass before expanding an
|
||||||
|
/// AtomicRMW/AtomicCmpXchg/AtomicStore/AtomicLoad.
|
||||||
|
/// RMW and CmpXchg set both IsStore and IsLoad to true.
|
||||||
|
/// Backends with !getInsertFencesForAtomic() should keep a no-op here
|
||||||
|
virtual void emitLeadingFence(IRBuilder<> &Builder, AtomicOrdering Ord,
|
||||||
|
bool IsStore, bool IsLoad) const {
|
||||||
|
assert(!getInsertFencesForAtomic());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Inserts in the IR a target-specific intrinsic specifying a fence.
|
||||||
|
/// It is called by AtomicExpandPass after expanding an
|
||||||
|
/// AtomicRMW/AtomicCmpXchg/AtomicStore/AtomicLoad.
|
||||||
|
/// RMW and CmpXchg set both IsStore and IsLoad to true.
|
||||||
|
/// Backends with !getInsertFencesForAtomic() should keep a no-op here
|
||||||
|
virtual void emitTrailingFence(IRBuilder<> &Builder, AtomicOrdering Ord,
|
||||||
|
bool IsStore, bool IsLoad) const {
|
||||||
|
assert(!getInsertFencesForAtomic());
|
||||||
|
}
|
||||||
|
|
||||||
/// Return true if the given (atomic) instruction should be expanded by the
|
/// Return true if the given (atomic) instruction should be expanded by the
|
||||||
/// IR-level AtomicExpand pass into a loop involving
|
/// IR-level AtomicExpand pass into a loop involving
|
||||||
/// load-linked/store-conditional pairs. Atomic stores will be expanded in the
|
/// load-linked/store-conditional pairs. Atomic stores will be expanded in the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user