22#define DEBUG_TYPE "lower-atomic"
85 auto PA = Impl.run(
F, DummyFAM);
86 return !PA.areAllPreserved();
94char LowerAtomicLegacyPass::ID = 0;
96 "Lower atomic intrinsics to non-atomic form",
false,
false)
static bool runOnFunction(Function &F, bool PostInlining)
static bool LowerStoreInst(StoreInst *SI)
static bool LowerLoadInst(LoadInst *LI)
static bool LowerFenceInst(FenceInst *FI)
static bool runOnBasicBlock(BasicBlock &BB)
static bool lowerAtomics(Function &F)
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
An instruction that atomically checks whether a specified value is in a memory location,...
an instruction that atomically reads a memory location, combines it with another value,...
LLVM Basic Block Representation.
An instruction for ordering other memory operations.
FunctionPass class - This class is used to implement most global optimizations.
LLVM_ABI InstListType::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
An instruction for reading from memory.
void setAtomic(AtomicOrdering Ordering, SyncScope::ID SSID=SyncScope::System)
Sets the ordering constraint and the synchronization scope ID of this load instruction.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Pass interface - Implemented by all 'passes'.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
An instruction for storing to memory.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI void initializeLowerAtomicLegacyPassPass(PassRegistry &)
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
LLVM_ABI Pass * createLowerAtomicPass()
bool lowerAtomicCmpXchgInst(AtomicCmpXchgInst *CXI)
Convert the given Cmpxchg into primitive load and compare.
bool lowerAtomicRMWInst(AtomicRMWInst *RMWI)
Convert the given RMWI into primitive load and stores, assuming that doing so is legal.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.