24 class MemIntrinsicPlugin :
public InstVisitor<MemIntrinsicPlugin> {
26 std::vector<CandidateInfo> *Candidates;
31 MemIntrinsicPlugin(
Function &Fn) : F(Fn), Candidates(nullptr) {}
33 void run(std::vector<CandidateInfo> &Cs) {
41 if (dyn_cast<ConstantInt>(Length))
46 Candidates->emplace_back(CandidateInfo{Length, InsertPt, AnnotatedInst});
51 class IndirectCallPromotionPlugin {
57 IndirectCallPromotionPlugin(
Function &Fn) : F(Fn) {}
59 void run(std::vector<CandidateInfo> &Candidates) {
65 Candidates.emplace_back(CandidateInfo{Callee, InsertPt, AnnotatedInst});
73 #define VP_PLUGIN_LIST \ 75 IndirectCallPromotionPlugin Base class for instruction visitors.
This class represents lattice values for constants.
Value * getLength() const
ValTy * getCalledValue() const
Return the pointer to function that is being called.
This is the common base class for memset/memcpy/memmove.
amdgpu Simplify well known AMD library false FunctionCallee Callee
std::vector< Instruction * > findIndirectCalls(Function &F)
LLVM Value Representation.