LLVM: include/llvm/Analysis/IndirectCallVisitor.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12#ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
13#define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
14
16#include
17
18namespace llvm {
19
20
29
30
31
32
33
34
35
36
37
39 assert(CB != nullptr && "Caller guaranteed");
41 return nullptr;
42
44 if (LI != nullptr) {
47
48
49
50
51
52
53
54
55
56
59 }
60 return nullptr;
61 }
62
64 if (Call.isIndirectCall()) {
66
68 return;
69
72 if (VPtr)
74 }
75 }
76
77private:
78 InstructionType Type;
79};
80
87
94
95}
96
97#endif
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)
Definition IndirectCallVisitor.h:81
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
bool isa(const From &Val)
isa - Return true if the parameter to the template is an instance of one of the template type argu...
std::vector< Instruction * > findVTableAddrs(Function &F)
Definition IndirectCallVisitor.h:88
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
InstructionType
Definition IndirectCallVisitor.h:22
@ kVTableVal
Definition IndirectCallVisitor.h:24
@ kIndirectCall
Definition IndirectCallVisitor.h:23
std::vector< CallBase * > IndirectCalls
Definition IndirectCallVisitor.h:26
PGOIndirectCallVisitor(InstructionType Type)
Definition IndirectCallVisitor.h:28
std::vector< Instruction * > ProfiledAddresses
Definition IndirectCallVisitor.h:27
static Instruction * tryGetVTableInstruction(CallBase *CB)
Definition IndirectCallVisitor.h:38
void visitCallBase(CallBase &Call)
Definition IndirectCallVisitor.h:63