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

Class template for optional values.

Parameters

NameDescription
CallBase class for all callable instructions (InvokeInst and CallInst) Holds everything related to calling a function.
CalleeTTIThis pass provides access to the codegen interfaces that are needed for IR-level transformations.
GetAssumptionCacheAn 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.
GetBFIAn 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.
GetTLIAn 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.
PSIAnalysis providing profile information.
OREThe optimization diagnostic interface.