50 if (
auto *GCR = dyn_cast<GCRelocateInst>(&
I))
57 Value *OrigPtr = GCRel->getDerivedPtr();
58 Value *ReplaceGCRel = OrigPtr;
62 if (GCRel->getType() != OrigPtr->
getType())
69 GCRel->eraseFromParent();
71 return !GCRelocates.empty();
75 "Strip gc.relocates inserted through RewriteStatepointsForGC",
void push_back(const T &Elt)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Compute iterated dominance frontiers using a linear time algorithm.
Type * getType() const
All values are typed, get the type of this value.
This class represents a no-op cast from one type to another.
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
static bool runOnFunction(Function &F, bool PostInlining)
Represent the analysis usage information of a pass.
void initializeStripGCRelocatesPass(PassRegistry &)
FunctionPass class - This class is used to implement most global optimizations.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
bool isStatepoint(ImmutableCallSite CS)
Represents calls to the gc.relocate intrinsic.
LLVM Value Representation.
inst_range instructions(Function *F)