22#include "llvm/IR/IntrinsicsSPIRV.h"
47 if (
II->getIntrinsicID() != Intrinsic::experimental_convergence_entry &&
48 II->getIntrinsicID() != Intrinsic::experimental_convergence_loop &&
49 II->getIntrinsicID() != Intrinsic::experimental_convergence_anchor)
59 auto CleanupCall = [&](
CallInst *CI) {
66 NewCall->copyMetadata(*CI);
67 CI->replaceAllUsesWith(NewCall);
73 if (
auto *
II = dyn_cast<IntrinsicInst>(&
I))
74 if (CleanupIntrinsic(
II))
76 if (
auto *CI = dyn_cast<CallInst>(&
I))
91 "SPIRV strip convergent intrinsics",
false,
false)
ReachingDefAnalysis InstSet & ToRemove
uint64_t IntrinsicInst * II
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
virtual bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
SPIRVStripConvergentIntrinsics()
LLVM Basic Block Representation.
static CallBase * removeOperandBundle(CallBase *CB, uint32_t ID, InsertPosition InsertPt=nullptr)
Create a clone of CB with operand bundle ID removed.
This class represents a function call, abstracting a target machine's calling convention.
Implements a dense probed hash-table based set.
FunctionPass class - This class is used to implement most global optimizations.
A wrapper class for inspecting calls to intrinsic functions.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
static UndefValue * get(Type *T)
Static factory methods - Return an 'undef' object of the specified type.
This is an optimization pass for GlobalISel generic memory operations.
FunctionPass * createSPIRVStripConvergenceIntrinsicsPass()
void initializeSPIRVStripConvergentIntrinsicsPass(PassRegistry &)