41 NewCall->copyMetadata(*CI);
42 CI->replaceAllUsesWith(NewCall);
43 CI->eraseFromParent();
50 if (
II->getIntrinsicID() == Intrinsic::experimental_convergence_entry ||
51 II->getIntrinsicID() == Intrinsic::experimental_convergence_loop ||
52 II->getIntrinsicID() == Intrinsic::experimental_convergence_anchor)
60 II->eraseFromParent();
76class StripConvergenceIntrinsicsLegacyPass :
public FunctionPass {
91char StripConvergenceIntrinsicsLegacyPass::ID = 0;
93 "strip-convergence-intrinsics",
94 "Strip convergence intrinsics and operand bundles",
false,
98 return new StripConvergenceIntrinsicsLegacyPass();
static bool runOnFunction(Function &F, bool PostInlining)
uint64_t IntrinsicInst * II
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This file defines the SmallVector class.
static bool stripConvergenceIntrinsics(Function &F)
This pass strips convergence intrinsics and operand bundles as those are only useful when modifying t...
LLVM Basic Block Representation.
Represents analyses that only rely on functions' control flow.
static LLVM_ABI CallBase * removeOperandBundle(CallBase *CB, uint32_t ID, InsertPosition InsertPt=nullptr)
Create a clone of CB with operand bundle ID removed.
FunctionPass class - This class is used to implement most global optimizations.
A wrapper class for inspecting calls to intrinsic functions.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A set of analyses that are preserved following a run of a transformation pass.
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.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void initializeStripConvergenceIntrinsicsLegacyPassPass(PassRegistry &)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
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 FunctionPass * createStripConvergenceIntrinsicsPass()
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.