LLVM 20.0.0git
Public Attributes | List of all members
llvm::InlineParams Struct Reference

Thresholds to tune inline cost analysis. More...

#include "llvm/Analysis/InlineCost.h"

Public Attributes

int DefaultThreshold = -1
 The default threshold to start with for a callee.
 
std::optional< int > HintThreshold
 Threshold to use for callees with inline hint.
 
std::optional< int > ColdThreshold
 Threshold to use for cold callees.
 
std::optional< int > OptSizeThreshold
 Threshold to use when the caller is optimized for size.
 
std::optional< int > OptMinSizeThreshold
 Threshold to use when the caller is optimized for minsize.
 
std::optional< int > HotCallSiteThreshold
 Threshold to use when the callsite is considered hot.
 
std::optional< int > LocallyHotCallSiteThreshold
 Threshold to use when the callsite is considered hot relative to function entry.
 
std::optional< int > ColdCallSiteThreshold
 Threshold to use when the callsite is considered cold.
 
std::optional< boolComputeFullInlineCost
 Compute inline cost even when the cost has exceeded the threshold.
 
std::optional< boolEnableDeferral
 Indicate whether we should allow inline deferral.
 
std::optional< boolAllowRecursiveCall = false
 Indicate whether we allow inlining for recursive call.
 

Detailed Description

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.

Definition at line 206 of file InlineCost.h.

Member Data Documentation

◆ AllowRecursiveCall

std::optional<bool> llvm::InlineParams::AllowRecursiveCall = false

Indicate whether we allow inlining for recursive call.

Definition at line 239 of file InlineCost.h.

◆ ColdCallSiteThreshold

std::optional<int> llvm::InlineParams::ColdCallSiteThreshold

Threshold to use when the callsite is considered cold.

Definition at line 230 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ ColdThreshold

std::optional<int> llvm::InlineParams::ColdThreshold

Threshold to use for cold callees.

Definition at line 214 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ ComputeFullInlineCost

std::optional<bool> llvm::InlineParams::ComputeFullInlineCost

Compute inline cost even when the cost has exceeded the threshold.

Definition at line 233 of file InlineCost.h.

◆ DefaultThreshold

int llvm::InlineParams::DefaultThreshold = -1

The default threshold to start with for a callee.

Definition at line 208 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ EnableDeferral

std::optional<bool> llvm::InlineParams::EnableDeferral

Indicate whether we should allow inline deferral.

Definition at line 236 of file InlineCost.h.

Referenced by llvm::PassBuilder::buildInlinerPipeline(), llvm::PassBuilder::buildModuleInlinerPipeline(), and getDefaultInlineAdvice().

◆ HintThreshold

std::optional<int> llvm::InlineParams::HintThreshold

Threshold to use for callees with inline hint.

Definition at line 211 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ HotCallSiteThreshold

std::optional<int> llvm::InlineParams::HotCallSiteThreshold

Threshold to use when the callsite is considered hot.

Definition at line 223 of file InlineCost.h.

Referenced by llvm::PassBuilder::buildInlinerPipeline(), llvm::PassBuilder::buildModuleInlinerPipeline(), and llvm::getInlineParams().

◆ LocallyHotCallSiteThreshold

std::optional<int> llvm::InlineParams::LocallyHotCallSiteThreshold

Threshold to use when the callsite is considered hot relative to function entry.

Definition at line 227 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ OptMinSizeThreshold

std::optional<int> llvm::InlineParams::OptMinSizeThreshold

Threshold to use when the caller is optimized for minsize.

Definition at line 220 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ OptSizeThreshold

std::optional<int> llvm::InlineParams::OptSizeThreshold

Threshold to use when the caller is optimized for size.

Definition at line 217 of file InlineCost.h.

Referenced by llvm::getInlineParams().


The documentation for this struct was generated from the following file: