LLVM 19.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 205 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 238 of file InlineCost.h.

◆ ColdCallSiteThreshold

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

Threshold to use when the callsite is considered cold.

Definition at line 229 of file InlineCost.h.

Referenced by llvm::getInlineParams().

◆ ColdThreshold

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

Threshold to use for cold callees.

Definition at line 213 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 232 of file InlineCost.h.

◆ DefaultThreshold

int llvm::InlineParams::DefaultThreshold = -1

The default threshold to start with for a callee.

Definition at line 207 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 235 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 210 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 222 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 226 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 219 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 216 of file InlineCost.h.

Referenced by llvm::getInlineParams().


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