Represents the cost of inlining a function.
Synopsis
Declared in <llvm/Analysis/InlineCost.h>
class InlineCost;
Description
This supports special values for functions which should "always" or "never" be inlined. Otherwise, the cost represents a unitless amount; smaller values increase the likelihood of the function being inlined.
Objects of this type also provide the adjusted threshold for inlining based on the information available for a particular callsite. They can be directly tested to determine if inlining should occur given the cost and threshold for this cost metric.
Member Functions
Name |
Description |
Get the inline cost estimate. It is an error to call this on an "always" or "never" InlineCost. |
|
Get the cost‐benefit pair which was computed by cost‐benefit analysis |
|
Get the cost delta from the threshold for inlining. Only valid if the cost is of the variable kind. Returns a negative value if the cost is too high to inline. |
|
Get the reason of Always or Never. |
|
Get the amount of StaticBonus applied. |
|
Get the threshold against which the cost was computed |
|
Return true if this cost is the always‐inline sentinel. |
|
Return true if this cost is the never‐inline sentinel. |
|
Return true if this cost is a finite estimate rather than a sentinel. |
|
Test whether the inline cost is low enough for inlining. |
Static Member Functions
Non-Member Functions
Name |
Description |
Get an InlineCost object representing the cost of inlining this callsite. |
|
Get an InlineCost with the callee explicitly specified. |
|
Utility for extracting the inline cost message to a string. |
|
Return the inline cost when the inliner should attempt |
Created with MrDocs