mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Expose UnrollThreshold and Inline_Benefit_reduction in the command line for automatic code size tuning
This commit is contained in:
@@ -1188,6 +1188,20 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (const Arg *A = Args.getLastArg(OPT_sil_inline_caller_benefit_reduction_factor)) {
|
||||
if (StringRef(A->getValue()).getAsInteger(10, Opts.CallerBaseBenefitReductionFactor)) {
|
||||
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
|
||||
A->getAsString(Args), A->getValue());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (const Arg *A = Args.getLastArg(OPT_sil_unroll_threshold)) {
|
||||
if (StringRef(A->getValue()).getAsInteger(10, Opts.UnrollThreshold)) {
|
||||
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
|
||||
A->getAsString(Args), A->getValue());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (const Arg *A = Args.getLastArg(OPT_num_threads)) {
|
||||
if (StringRef(A->getValue()).getAsInteger(10, Opts.NumThreads)) {
|
||||
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
|
||||
|
||||
Reference in New Issue
Block a user