mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Expose UnrollThreshold and Inline_Benefit_reduction in the command line for automatic code size tuning
This commit is contained in:
@@ -256,7 +256,9 @@ bool SILPerformanceInliner::isProfitableToInline(
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseBenefit = BaseBenefit / 2;
|
||||
// Use command line option to control inlining in Osize mode.
|
||||
const uint64_t CallerBaseBenefitReductionFactor = AI.getFunction()->getModule().getOptions().CallerBaseBenefitReductionFactor;
|
||||
BaseBenefit = BaseBenefit / CallerBaseBenefitReductionFactor;
|
||||
}
|
||||
|
||||
// It is always OK to inline a simple call.
|
||||
|
||||
Reference in New Issue
Block a user