LLVM  16.0.0git
InlineCost.h
Go to the documentation of this file.
1 //===- InlineCost.h - Cost analysis for inliner -----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements heuristics for inlining decisions.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_ANALYSIS_INLINECOST_H
14 #define LLVM_ANALYSIS_INLINECOST_H
15 
16 #include "llvm/ADT/APInt.h"
17 #include "llvm/ADT/Optional.h"
20 #include "llvm/IR/PassManager.h"
21 #include <cassert>
22 #include <climits>
23 
24 namespace llvm {
25 class AssumptionCache;
26 class OptimizationRemarkEmitter;
27 class BlockFrequencyInfo;
28 class CallBase;
29 class DataLayout;
30 class Function;
31 class ProfileSummaryInfo;
32 class TargetTransformInfo;
33 class TargetLibraryInfo;
34 
35 namespace InlineConstants {
36 // Various thresholds used by inline cost analysis.
37 /// Use when optsize (-Os) is specified.
38 const int OptSizeThreshold = 50;
39 
40 /// Use when minsize (-Oz) is specified.
41 const int OptMinSizeThreshold = 5;
42 
43 /// Use when -O3 is specified.
44 const int OptAggressiveThreshold = 250;
45 
46 // Various magic constants used to adjust heuristics.
47 int getInstrCost();
48 const int IndirectCallThreshold = 100;
49 const int LoopPenalty = 25;
50 const int LastCallToStaticBonus = 15000;
51 const int ColdccPenalty = 2000;
52 /// Do not inline functions which allocate this many bytes on the stack
53 /// when the caller is recursive.
54 const unsigned TotalAllocaSizeRecursiveCaller = 1024;
55 /// Do not inline dynamic allocas that have been constant propagated to be
56 /// static allocas above this amount in bytes.
58 
60  "function-inline-cost-multiplier";
61 
62 const char MaxInlineStackSizeAttributeName[] = "inline-max-stacksize";
63 } // namespace InlineConstants
64 
65 // The cost-benefit pair computed by cost-benefit analysis.
67 public:
68  CostBenefitPair(APInt Cost, APInt Benefit) : Cost(Cost), Benefit(Benefit) {}
69 
70  const APInt &getCost() const { return Cost; }
71 
72  const APInt &getBenefit() const { return Benefit; }
73 
74 private:
75  APInt Cost;
76  APInt Benefit;
77 };
78 
79 /// Represents the cost of inlining a function.
80 ///
81 /// This supports special values for functions which should "always" or
82 /// "never" be inlined. Otherwise, the cost represents a unitless amount;
83 /// smaller values increase the likelihood of the function being inlined.
84 ///
85 /// Objects of this type also provide the adjusted threshold for inlining
86 /// based on the information available for a particular callsite. They can be
87 /// directly tested to determine if inlining should occur given the cost and
88 /// threshold for this cost metric.
89 class InlineCost {
90  enum SentinelValues { AlwaysInlineCost = INT_MIN, NeverInlineCost = INT_MAX };
91 
92  /// The estimated cost of inlining this callsite.
93  int Cost = 0;
94 
95  /// The adjusted threshold against which this cost was computed.
96  int Threshold = 0;
97 
98  /// The amount of StaticBonus that has been applied.
99  int StaticBonusApplied = 0;
100 
101  /// Must be set for Always and Never instances.
102  const char *Reason = nullptr;
103 
104  /// The cost-benefit pair computed by cost-benefit analysis.
105  Optional<CostBenefitPair> CostBenefit = None;
106 
107  // Trivial constructor, interesting logic in the factory functions below.
108  InlineCost(int Cost, int Threshold, int StaticBonusApplied,
109  const char *Reason = nullptr,
111  : Cost(Cost), Threshold(Threshold),
112  StaticBonusApplied(StaticBonusApplied), Reason(Reason),
114  assert((isVariable() || Reason) &&
115  "Reason must be provided for Never or Always");
116  }
117 
118 public:
119  static InlineCost get(int Cost, int Threshold, int StaticBonus = 0) {
120  assert(Cost > AlwaysInlineCost && "Cost crosses sentinel value");
121  assert(Cost < NeverInlineCost && "Cost crosses sentinel value");
122  return InlineCost(Cost, Threshold, StaticBonus);
123  }
124  static InlineCost getAlways(const char *Reason,
125  Optional<CostBenefitPair> CostBenefit = None) {
126  return InlineCost(AlwaysInlineCost, 0, 0, Reason, CostBenefit);
127  }
128  static InlineCost getNever(const char *Reason,
129  Optional<CostBenefitPair> CostBenefit = None) {
130  return InlineCost(NeverInlineCost, 0, 0, Reason, CostBenefit);
131  }
132 
133  /// Test whether the inline cost is low enough for inlining.
134  explicit operator bool() const { return Cost < Threshold; }
135 
136  bool isAlways() const { return Cost == AlwaysInlineCost; }
137  bool isNever() const { return Cost == NeverInlineCost; }
138  bool isVariable() const { return !isAlways() && !isNever(); }
139 
140  /// Get the inline cost estimate.
141  /// It is an error to call this on an "always" or "never" InlineCost.
142  int getCost() const {
143  assert(isVariable() && "Invalid access of InlineCost");
144  return Cost;
145  }
146 
147  /// Get the threshold against which the cost was computed
148  int getThreshold() const {
149  assert(isVariable() && "Invalid access of InlineCost");
150  return Threshold;
151  }
152 
153  /// Get the amount of StaticBonus applied.
154  int getStaticBonusApplied() const {
155  assert(isVariable() && "Invalid access of InlineCost");
156  return StaticBonusApplied;
157  }
158 
159  /// Get the cost-benefit pair which was computed by cost-benefit analysis
161 
162  /// Get the reason of Always or Never.
163  const char *getReason() const {
164  assert((Reason || isVariable()) &&
165  "InlineCost reason must be set for Always or Never");
166  return Reason;
167  }
168 
169  /// Get the cost delta from the threshold for inlining.
170  /// Only valid if the cost is of the variable kind. Returns a negative
171  /// value if the cost is too high to inline.
172  int getCostDelta() const { return Threshold - getCost(); }
173 };
174 
175 /// InlineResult is basically true or false. For false results the message
176 /// describes a reason.
178  const char *Message = nullptr;
179  InlineResult(const char *Message = nullptr) : Message(Message) {}
180 
181 public:
182  static InlineResult success() { return {}; }
183  static InlineResult failure(const char *Reason) {
184  return InlineResult(Reason);
185  }
186  bool isSuccess() const { return Message == nullptr; }
187  const char *getFailureReason() const {
188  assert(!isSuccess() &&
189  "getFailureReason should only be called in failure cases");
190  return Message;
191  }
192 };
193 
194 /// Thresholds to tune inline cost analysis. The inline cost analysis decides
195 /// the condition to apply a threshold and applies it. Otherwise,
196 /// DefaultThreshold is used. If a threshold is Optional, it is applied only
197 /// when it has a valid value. Typically, users of inline cost analysis
198 /// obtain an InlineParams object through one of the \c getInlineParams methods
199 /// and pass it to \c getInlineCost. Some specialized versions of inliner
200 /// (such as the pre-inliner) might have custom logic to compute \c InlineParams
201 /// object.
202 
203 struct InlineParams {
204  /// The default threshold to start with for a callee.
206 
207  /// Threshold to use for callees with inline hint.
209 
210  /// Threshold to use for cold callees.
212 
213  /// Threshold to use when the caller is optimized for size.
215 
216  /// Threshold to use when the caller is optimized for minsize.
218 
219  /// Threshold to use when the callsite is considered hot.
221 
222  /// Threshold to use when the callsite is considered hot relative to function
223  /// entry.
225 
226  /// Threshold to use when the callsite is considered cold.
228 
229  /// Compute inline cost even when the cost has exceeded the threshold.
231 
232  /// Indicate whether we should allow inline deferral.
234 
235  /// Indicate whether we allow inlining for recursive call.
237 };
238 
240 
241 /// Generate the parameters to tune the inline cost analysis based only on the
242 /// commandline options.
244 
245 /// Generate the parameters to tune the inline cost analysis based on command
246 /// line options. If -inline-threshold option is not explicitly passed,
247 /// \p Threshold is used as the default threshold.
248 InlineParams getInlineParams(int Threshold);
249 
250 /// Generate the parameters to tune the inline cost analysis based on command
251 /// line options. If -inline-threshold option is not explicitly passed,
252 /// the default threshold is computed from \p OptLevel and \p SizeOptLevel.
253 /// An \p OptLevel value above 3 is considered an aggressive optimization mode.
254 /// \p SizeOptLevel of 1 corresponds to the -Os flag and 2 corresponds to
255 /// the -Oz flag.
256 InlineParams getInlineParams(unsigned OptLevel, unsigned SizeOptLevel);
257 
258 /// Return the cost associated with a callsite, including parameter passing
259 /// and the call/return instruction.
260 int getCallsiteCost(const CallBase &Call, const DataLayout &DL);
261 
262 /// Get an InlineCost object representing the cost of inlining this
263 /// callsite.
264 ///
265 /// Note that a default threshold is passed into this function. This threshold
266 /// could be modified based on callsite's properties and only costs below this
267 /// new threshold are computed with any accuracy. The new threshold can be
268 /// used to bound the computation necessary to determine whether the cost is
269 /// sufficiently low to warrant inlining.
270 ///
271 /// Also note that calling this function *dynamically* computes the cost of
272 /// inlining the callsite. It is an expensive, heavyweight call.
274 getInlineCost(CallBase &Call, const InlineParams &Params,
275  TargetTransformInfo &CalleeTTI,
276  function_ref<AssumptionCache &(Function &)> GetAssumptionCache,
277  function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
278  function_ref<BlockFrequencyInfo &(Function &)> GetBFI = nullptr,
279  ProfileSummaryInfo *PSI = nullptr,
280  OptimizationRemarkEmitter *ORE = nullptr);
281 
282 /// Get an InlineCost with the callee explicitly specified.
283 /// This allows you to calculate the cost of inlining a function via a
284 /// pointer. This behaves exactly as the version with no explicit callee
285 /// parameter in all other respects.
286 //
288 getInlineCost(CallBase &Call, Function *Callee, const InlineParams &Params,
289  TargetTransformInfo &CalleeTTI,
290  function_ref<AssumptionCache &(Function &)> GetAssumptionCache,
291  function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
292  function_ref<BlockFrequencyInfo &(Function &)> GetBFI = nullptr,
293  ProfileSummaryInfo *PSI = nullptr,
294  OptimizationRemarkEmitter *ORE = nullptr);
295 
296 /// Returns InlineResult::success() if the call site should be always inlined
297 /// because of user directives, and the inlining is viable. Returns
298 /// InlineResult::failure() if the inlining may never happen because of user
299 /// directives or incompatibilities detectable without needing callee traversal.
300 /// Otherwise returns None, meaning that inlining should be decided based on
301 /// other criteria (e.g. cost modeling).
303  CallBase &Call, Function *Callee, TargetTransformInfo &CalleeTTI,
304  function_ref<const TargetLibraryInfo &(Function &)> GetTLI);
305 
306 /// Get the cost estimate ignoring thresholds. This is similar to getInlineCost
307 /// when passed InlineParams::ComputeFullInlineCost, or a non-null ORE. It
308 /// uses default InlineParams otherwise.
309 /// Contrary to getInlineCost, which makes a threshold-based final evaluation of
310 /// should/shouldn't inline, captured in InlineResult, getInliningCostEstimate
311 /// returns:
312 /// - None, if the inlining cannot happen (is illegal)
313 /// - an integer, representing the cost.
315  CallBase &Call, TargetTransformInfo &CalleeTTI,
316  function_ref<AssumptionCache &(Function &)> GetAssumptionCache,
317  function_ref<BlockFrequencyInfo &(Function &)> GetBFI = nullptr,
318  ProfileSummaryInfo *PSI = nullptr,
319  OptimizationRemarkEmitter *ORE = nullptr);
320 
321 /// Get the expanded cost features. The features are returned unconditionally,
322 /// even if inlining is impossible.
324  CallBase &Call, TargetTransformInfo &CalleeTTI,
325  function_ref<AssumptionCache &(Function &)> GetAssumptionCache,
326  function_ref<BlockFrequencyInfo &(Function &)> GetBFI = nullptr,
327  ProfileSummaryInfo *PSI = nullptr,
328  OptimizationRemarkEmitter *ORE = nullptr);
329 
330 /// Minimal filter to detect invalid constructs for inlining.
332 
333 // This pass is used to annotate instructions during the inline process for
334 // debugging and analysis. The main purpose of the pass is to see and test
335 // inliner's decisions when creating new optimizations to InlineCost.
337  : PassInfoMixin<InlineCostAnnotationPrinterPass> {
339 
340 public:
343 };
344 } // namespace llvm
345 
346 #endif
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
llvm::InlineCost::isAlways
bool isAlways() const
Definition: InlineCost.h:136
llvm::InlineCost::getCost
int getCost() const
Get the inline cost estimate.
Definition: InlineCost.h:142
llvm::InlineResult::success
static InlineResult success()
Definition: InlineCost.h:182
llvm::InlineCostAnnotationPrinterPass::InlineCostAnnotationPrinterPass
InlineCostAnnotationPrinterPass(raw_ostream &OS)
Definition: InlineCost.h:341
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::getStringFnAttrAsInt
Optional< int > getStringFnAttrAsInt(CallBase &CB, StringRef AttrKind)
Definition: InlineCost.cpp:174
llvm::InlineCost::getStaticBonusApplied
int getStaticBonusApplied() const
Get the amount of StaticBonus applied.
Definition: InlineCost.h:154
Optional.h
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:113
llvm::InlineParams::DefaultThreshold
int DefaultThreshold
The default threshold to start with for a callee.
Definition: InlineCost.h:205
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371
llvm::Function
Definition: Function.h:60
llvm::InlineParams::LocallyHotCallSiteThreshold
Optional< int > LocallyHotCallSiteThreshold
Threshold to use when the callsite is considered hot relative to function entry.
Definition: InlineCost.h:224
llvm::TargetTransformInfo
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
Definition: TargetTransformInfo.h:172
FAM
FunctionAnalysisManager FAM
Definition: PassBuilderBindings.cpp:59
APInt.h
llvm::InlineConstants::OptSizeThreshold
const int OptSizeThreshold
Use when optsize (-Os) is specified.
Definition: InlineCost.h:38
llvm::InlineCost::getAlways
static InlineCost getAlways(const char *Reason, Optional< CostBenefitPair > CostBenefit=None)
Definition: InlineCost.h:124
llvm::Optional
Definition: APInt.h:33
llvm::isInlineViable
InlineResult isInlineViable(Function &Callee)
Minimal filter to detect invalid constructs for inlining.
Definition: InlineCost.cpp:2989
llvm::InlineParams
Thresholds to tune inline cost analysis.
Definition: InlineCost.h:203
llvm::InlineCost::getThreshold
int getThreshold() const
Get the threshold against which the cost was computed.
Definition: InlineCost.h:148
llvm::InlineConstants::FunctionInlineCostMultiplierAttributeName
const char FunctionInlineCostMultiplierAttributeName[]
Definition: InlineCost.h:59
llvm::InlineParams::ColdThreshold
Optional< int > ColdThreshold
Threshold to use for cold callees.
Definition: InlineCost.h:211
llvm::InlineCost::isNever
bool isNever() const
Definition: InlineCost.h:137
llvm::InlineParams::OptMinSizeThreshold
Optional< int > OptMinSizeThreshold
Threshold to use when the caller is optimized for minsize.
Definition: InlineCost.h:217
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::InlineParams::ComputeFullInlineCost
Optional< bool > ComputeFullInlineCost
Compute inline cost even when the cost has exceeded the threshold.
Definition: InlineCost.h:230
InlinePriorityMode::CostBenefit
@ CostBenefit
llvm::BlockFrequencyInfo
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
Definition: BlockFrequencyInfo.h:37
llvm::getInlineCost
InlineCost getInlineCost(CallBase &Call, const InlineParams &Params, TargetTransformInfo &CalleeTTI, function_ref< AssumptionCache &(Function &)> GetAssumptionCache, function_ref< const TargetLibraryInfo &(Function &)> GetTLI, function_ref< BlockFrequencyInfo &(Function &)> GetBFI=nullptr, ProfileSummaryInfo *PSI=nullptr, OptimizationRemarkEmitter *ORE=nullptr)
Get an InlineCost object representing the cost of inlining this callsite.
Definition: InlineCost.cpp:2822
InlinePriorityMode::Cost
@ Cost
llvm::InlineCost::get
static InlineCost get(int Cost, int Threshold, int StaticBonus=0)
Definition: InlineCost.h:119
llvm::InlineCost
Represents the cost of inlining a function.
Definition: InlineCost.h:89
llvm::InlineConstants::getInstrCost
int getInstrCost()
Definition: InlineCost.cpp:183
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
llvm::InlineResult::isSuccess
bool isSuccess() const
Definition: InlineCost.h:186
llvm::InlineCostAnnotationPrinterPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM)
Definition: InlineCost.cpp:3130
STLFunctionalExtras.h
llvm::getInlineParams
InlineParams getInlineParams()
Generate the parameters to tune the inline cost analysis based only on the commandline options.
Definition: InlineCost.cpp:3101
llvm::ProfileSummaryInfo
Analysis providing profile information.
Definition: ProfileSummaryInfo.h:39
llvm::function_ref
An efficient, type-erasing, non-owning reference to a callable.
Definition: STLFunctionalExtras.h:36
llvm::InlineConstants::MaxInlineStackSizeAttributeName
const char MaxInlineStackSizeAttributeName[]
Definition: InlineCost.h:62
llvm::InlineConstants::IndirectCallThreshold
const int IndirectCallThreshold
Definition: InlineCost.h:48
uint64_t
llvm::InlineConstants::OptAggressiveThreshold
const int OptAggressiveThreshold
Use when -O3 is specified.
Definition: InlineCost.h:44
llvm::InlineCost::getCostDelta
int getCostDelta() const
Get the cost delta from the threshold for inlining.
Definition: InlineCost.h:172
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::InlineCostAnnotationPrinterPass::OS
raw_ostream & OS
Definition: InlineCost.h:338
llvm::InlineParams::ColdCallSiteThreshold
Optional< int > ColdCallSiteThreshold
Threshold to use when the callsite is considered cold.
Definition: InlineCost.h:227
llvm::InlineCost::getNever
static InlineCost getNever(const char *Reason, Optional< CostBenefitPair > CostBenefit=None)
Definition: InlineCost.h:128
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::InlineCostAnnotationPrinterPass
Definition: InlineCost.h:336
llvm::OptimizationRemarkEmitter
The optimization diagnostic interface.
Definition: OptimizationRemarkEmitter.h:33
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::InlineCost::getReason
const char * getReason() const
Get the reason of Always or Never.
Definition: InlineCost.h:163
llvm::AssumptionCache
A cache of @llvm.assume calls within a function.
Definition: AssumptionCache.h:42
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::InlineResult::getFailureReason
const char * getFailureReason() const
Definition: InlineCost.h:187
llvm::InlineConstants::MaxSimplifiedDynamicAllocaToInline
const uint64_t MaxSimplifiedDynamicAllocaToInline
Do not inline dynamic allocas that have been constant propagated to be static allocas above this amou...
Definition: InlineCost.h:57
llvm::getAttributeBasedInliningDecision
Optional< InlineResult > getAttributeBasedInliningDecision(CallBase &Call, Function *Callee, TargetTransformInfo &CalleeTTI, function_ref< const TargetLibraryInfo &(Function &)> GetTLI)
Returns InlineResult::success() if the call site should be always inlined because of user directives,...
Definition: InlineCost.cpp:2870
llvm::InlineParams::HintThreshold
Optional< int > HintThreshold
Threshold to use for callees with inline hint.
Definition: InlineCost.h:208
llvm::None
constexpr std::nullopt_t None
Definition: None.h:27
llvm::InlineConstants::ColdccPenalty
const int ColdccPenalty
Definition: InlineCost.h:51
llvm::getInliningCostFeatures
Optional< InlineCostFeatures > getInliningCostFeatures(CallBase &Call, TargetTransformInfo &CalleeTTI, function_ref< AssumptionCache &(Function &)> GetAssumptionCache, function_ref< BlockFrequencyInfo &(Function &)> GetBFI=nullptr, ProfileSummaryInfo *PSI=nullptr, OptimizationRemarkEmitter *ORE=nullptr)
Get the expanded cost features.
Definition: InlineCost.cpp:2857
llvm::InlineCost::getCostBenefit
Optional< CostBenefitPair > getCostBenefit() const
Get the cost-benefit pair which was computed by cost-benefit analysis.
Definition: InlineCost.h:160
llvm::CostBenefitPair::CostBenefitPair
CostBenefitPair(APInt Cost, APInt Benefit)
Definition: InlineCost.h:68
llvm::CostBenefitPair::getCost
const APInt & getCost() const
Definition: InlineCost.h:70
PassManager.h
llvm::TargetLibraryInfo
Provides information about what library functions are available for the current target.
Definition: TargetLibraryInfo.h:225
llvm::getCallsiteCost
int getCallsiteCost(const CallBase &Call, const DataLayout &DL)
Return the cost associated with a callsite, including parameter passing and the call/return instructi...
Definition: InlineCost.cpp:2788
llvm::InlineResult::failure
static InlineResult failure(const char *Reason)
Definition: InlineCost.h:183
llvm::InlineConstants::OptMinSizeThreshold
const int OptMinSizeThreshold
Use when minsize (-Oz) is specified.
Definition: InlineCost.h:41
llvm::CostBenefitPair
Definition: InlineCost.h:66
llvm::getInliningCostEstimate
Optional< int > getInliningCostEstimate(CallBase &Call, TargetTransformInfo &CalleeTTI, function_ref< AssumptionCache &(Function &)> GetAssumptionCache, function_ref< BlockFrequencyInfo &(Function &)> GetBFI=nullptr, ProfileSummaryInfo *PSI=nullptr, OptimizationRemarkEmitter *ORE=nullptr)
Get the cost estimate ignoring thresholds.
Definition: InlineCost.cpp:2832
llvm::InlineConstants::LastCallToStaticBonus
const int LastCallToStaticBonus
Definition: InlineCost.h:50
llvm::CostBenefitPair::getBenefit
const APInt & getBenefit() const
Definition: InlineCost.h:72
llvm::CallBase
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
Definition: InstrTypes.h:1174
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::InlineCost::isVariable
bool isVariable() const
Definition: InlineCost.h:138
InlineModelFeatureMaps.h
llvm::InlineParams::HotCallSiteThreshold
Optional< int > HotCallSiteThreshold
Threshold to use when the callsite is considered hot.
Definition: InlineCost.h:220
llvm::InlineConstants::TotalAllocaSizeRecursiveCaller
const unsigned TotalAllocaSizeRecursiveCaller
Do not inline functions which allocate this many bytes on the stack when the caller is recursive.
Definition: InlineCost.h:54
llvm::InlineParams::EnableDeferral
Optional< bool > EnableDeferral
Indicate whether we should allow inline deferral.
Definition: InlineCost.h:233
llvm::InlineParams::AllowRecursiveCall
Optional< bool > AllowRecursiveCall
Indicate whether we allow inlining for recursive call.
Definition: InlineCost.h:236
llvm::InlineConstants::LoopPenalty
const int LoopPenalty
Definition: InlineCost.h:49
llvm::InlineResult
InlineResult is basically true or false.
Definition: InlineCost.h:177
llvm::InlineParams::OptSizeThreshold
Optional< int > OptSizeThreshold
Threshold to use when the caller is optimized for size.
Definition: InlineCost.h:214
llvm::codeview::PublicSymFlags::Function
@ Function