12#ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
13#define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
39 assert(CB !=
nullptr &&
"Caller guaranteed");
57 if (VTablePtr !=
nullptr && isa<Instruction>(VTablePtr))
58 return cast<Instruction>(VTablePtr);
64 if (Call.isIndirectCall()) {
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
bool isIndirectCall() const
Return true if the callsite is an indirect call.
Value * getCalledOperand() const
Base class for instruction visitors.
void visit(Iterator Start, Iterator End)
An instruction for reading from memory.
Value * getPointerOperand()
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
const Value * stripInBoundsConstantOffsets() const
Strip off pointer casts and all-constant inbounds GEPs.
This is an optimization pass for GlobalISel generic memory operations.
std::vector< CallBase * > findIndirectCalls(Function &F)
std::vector< Instruction * > findVTableAddrs(Function &F)
std::vector< CallBase * > IndirectCalls
PGOIndirectCallVisitor(InstructionType Type)
std::vector< Instruction * > ProfiledAddresses
static Instruction * tryGetVTableInstruction(CallBase *CB)
void visitCallBase(CallBase &Call)