llvm::getInlineCost

Get an InlineCost with the callee explicitly specified.

Synopsis

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);

Description

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.

Return Value

The computed InlineCost for inlining Callee at Call.

Parameters

NameDescription
CallCall site whose inlining cost is computed.
CalleeCallee to consider; may differ from the called function.
ParamsThresholds and knobs that tune the cost analysis.
CalleeTTITarget transform info for the callee.
GetAssumptionCacheCallback returning the assumption cache for a function.
GetTLICallback returning target library info for a function.
GetBFIOptional callback returning block frequency info, or null.
PSIOptional profile summary used for hot/cold callsite thresholds.
OREOptional remark emitter for inlining diagnostics.
GetEphValuesCacheOptional callback returning the ephemeral values cache for a function.