ΒΆbool isLegalToPromote(
const llvm::CallBase& CB,
llvm::Function* Callee,
const char** FailureReason = nullptr)
bool isLegalToPromote(
const llvm::CallBase& CB,
llvm::Function* Callee,
const char** FailureReason = nullptr)
Description
Return true if the given indirect call site can be made to call \p Callee. This function ensures that the number and type of the call site's arguments and return value match those of the given function. If the types do not match exactly, they must at least be bitcast compatible. If \p FailureReason is non-null and the indirect call cannot be promoted, the failure reason will be stored in it.
Declared at: llvm/include/llvm/Transforms/Utils/CallPromotionUtils.h:31
Parameters
- const llvm::CallBase& CB
- llvm::Function* Callee
- const char** FailureReason = nullptr