14#ifndef LLVM_TRANSFORMS_UTILS_CALLPROMOTIONUTILS_H
15#define LLVM_TRANSFORMS_UTILS_CALLPROMOTIONUTILS_H
36 const char **FailureReason =
nullptr);
45CallBase &
promoteCall(CallBase &CB, Function *Callee,
46 CastInst **RetBitCast =
nullptr);
58 MDNode *BranchWeights =
nullptr);
61 PGOContextualProfile &CtxProf);
76 ArrayRef<Constant *> AddressPoints,
77 MDNode *BranchWeights);
109CallBase &
versionCallSite(CallBase &CB, Value *Callee, MDNode *BranchWeights);
This is an optimization pass for GlobalISel generic memory operations.
bool isLegalToPromote(const CallBase &CB, Function *Callee, const char **FailureReason=nullptr)
Return true if the given indirect call site can be made to call Callee.
CallBase & promoteCallWithIfThenElse(CallBase &CB, Function *Callee, MDNode *BranchWeights=nullptr)
Promote the given indirect call site to conditionally call Callee.
CallBase & versionCallSite(CallBase &CB, Value *Callee, MDNode *BranchWeights)
Predicate and clone the given call site.
CallBase & promoteCall(CallBase &CB, Function *Callee, CastInst **RetBitCast=nullptr)
Promote the given indirect call site to unconditionally call Callee.
ArrayRef(const T &OneElt) -> ArrayRef< T >
bool tryPromoteCall(CallBase &CB)
Try to promote (devirtualize) a virtual call on an Alloca.
CallBase & promoteCallWithVTableCmp(CallBase &CB, Instruction *VPtr, Function *Callee, ArrayRef< Constant * > AddressPoints, MDNode *BranchWeights)
This is similar to promoteCallWithIfThenElse except that the condition to promote a virtual call is t...