40 NVPTXAtomicLowerLegacyPass() : FunctionPass(ID) {}
42 void getAnalysisUsage(AnalysisUsage &AU)
const override {
46 StringRef getPassName()
const override {
47 return "NVPTX lower atomics of local memory";
56char NVPTXAtomicLowerLegacyPass::ID = 0;
59 "Lower atomics of local memory to simple load/stores",
false,
63 return new NVPTXAtomicLowerLegacyPass();
Expand Atomic instructions
static bool runOnFunction(Function &F, bool PostInlining)
static bool lowerLocalMemoryAtomics(Function &F)
FunctionAnalysisManager FAM
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
LLVM_ABI void setPreservesCFG()
This function should be called by the pass, iff they do not:
an instruction that atomically reads a memory location, combines it with another value,...
Represents analyses that only rely on functions' control flow.
FunctionPass class - This class is used to implement most global optimizations.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM)
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.
PreservedAnalyses & preserveSet()
Mark an analysis set as preserved.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
FunctionPass * createNVPTXAtomicLowerLegacyPass()
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI 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.