Get an InlineCost with the callee explicitly specified. This allows you to calculate the cost of inlining a function via a pointer. This behaves exactly as the version with no explicit callee parameter in all other respects.
Declared in <llvm/Analysis/InlineCost.h>
InlineCost
getInlineCost(
CallBase& Call,
Function* Callee,
InlineParams const& Params,
TargetTransformInfo& CalleeTTI,
function_ref<AssumptionCache&(Function&)> GetAssumptionCache,
function_ref<TargetLibraryInfo const&(Function&)> GetTLI,
function_ref<BlockFrequencyInfo&(Function&)> GetBFI = nullptr,
ProfileSummaryInfo* PSI = nullptr,
OptimizationRemarkEmitter* ORE = nullptr,
function_ref<EphemeralValuesCache&(Function&)> GetEphValuesCache = nullptr);
Represents the cost of inlining a function.
| Name | Description |
|---|---|
| Call | Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to calling a function. |
| Params | Thresholds to tune inline cost analysis. The inline cost analysis decides the condition to apply a threshold and applies it. Otherwise, DefaultThreshold is used. If a threshold is Optional, it is applied only when it has a valid value. Typically, users of inline cost analysis obtain an InlineParams object through one of the getInlineParams methods and pass it to getInlineCost. Some specialized versions of inliner (such as the pre-inliner) might have custom logic to compute InlineParams object. |
| CalleeTTI | This pass provides access to the codegen interfaces that are needed for IR-level transformations. |
| GetAssumptionCache | An efficient, type-erasing, non-owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns. |
| GetTLI | An efficient, type-erasing, non-owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns. |
| GetBFI | An efficient, type-erasing, non-owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns. |
| PSI | Analysis providing profile information. |
| ORE | The optimization diagnostic interface. |
| GetEphValuesCache | An efficient, type-erasing, non-owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns. |