12#ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
13#define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
39 assert(CB !=
nullptr &&
"Caller guaranteed");
64 if (
Call.isIndirectCall()) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
LLVM_ABI 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.
LLVM_ABI 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)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
std::vector< Instruction * > findVTableAddrs(Function &F)
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
std::vector< CallBase * > IndirectCalls
PGOIndirectCallVisitor(InstructionType Type)
std::vector< Instruction * > ProfiledAddresses
static Instruction * tryGetVTableInstruction(CallBase *CB)
void visitCallBase(CallBase &Call)