llvm::getInliningCostFeatures

Get the expanded cost features. The features are returned unconditionally, even if inlining is impossible.

Synopsis

Declared in <llvm/Analysis/InlineCost.h>

std::optional<InlineCostFeatures>
getInliningCostFeatures(
    CallBase& Call,
    TargetTransformInfo& CalleeTTI,
    function_ref<AssumptionCache&(Function&)> GetAssumptionCache,
    function_ref<BlockFrequencyInfo&(Function&)> GetBFI = nullptr,
    function_ref<TargetLibraryInfo const&(Function&)> GetTLI = nullptr,
    ProfileSummaryInfo* PSI = nullptr,
    OptimizationRemarkEmitter* ORE = nullptr);

Return Value

The expanded cost features for Call.

Parameters

NameDescription
CallCall site whose cost features are collected.
CalleeTTITarget transform info for the callee.
GetAssumptionCacheCallback returning the assumption cache for a function.
GetBFIOptional callback returning block frequency info, or null.
GetTLIOptional callback returning target library info, or null.
PSIOptional profile summary used for hot/cold callsite thresholds.
OREOptional remark emitter for inlining diagnostics.