30 NVPTXAtomicLower() : FunctionPass(ID) {}
32 void getAnalysisUsage(AnalysisUsage &AU)
const override {
36 StringRef getPassName()
const override {
37 return "NVPTX lower atomics of local memory";
44bool NVPTXAtomicLower::runOnFunction(
Function &
F) {
52 for (AtomicRMWInst *RMWI : LocalMemoryAtomics)
57char NVPTXAtomicLower::ID = 0;
60 "Lower atomics of local memory to simple load/stores",
false,
64 return new NVPTXAtomicLower();
Expand Atomic instructions
static bool runOnFunction(Function &F, bool PostInlining)
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
LLVM_ABI void setPreservesCFG()
This function should be called by the pass, iff they do not:
FunctionPass class - This class is used to implement most global optimizations.
void push_back(const T &Elt)
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.
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
FunctionPass * createNVPTXAtomicLowerPass()
bool lowerAtomicRMWInst(AtomicRMWInst *RMWI)
Convert the given RMWI into primitive load and stores, assuming that doing so is legal.