22#include "llvm/IR/IntrinsicsSPIRV.h"
46 if (
auto *
II = dyn_cast<IntrinsicInst>(&
I)) {
47 if (
II->getIntrinsicID() !=
48 Intrinsic::experimental_convergence_entry &&
49 II->getIntrinsicID() !=
50 Intrinsic::experimental_convergence_loop &&
51 II->getIntrinsicID() !=
52 Intrinsic::experimental_convergence_anchor) {
58 }
else if (
auto *CI = dyn_cast<CallInst>(&
I)) {
65 NewCall->copyMetadata(*CI);
66 CI->replaceAllUsesWith(NewCall);
82 "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.
Implements a dense probed hash-table based set.
FunctionPass class - This class is used to implement most global optimizations.
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 &)