mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SwiftPGO] Add driver support for -profile-use=<path>
This option tells the compiler where to find a profdata file. The information in this file enables PGO. For more information about the PGO infrastructure, look for the -profile-generate option and for the llvm-profdata tool [1]. [1] http://llvm.org/docs/CommandGuide/llvm-profdata.html
This commit is contained in:
committed by
Joe Shajrawi
parent
f3a7d3ac0f
commit
1621facc6c
@@ -1458,6 +1458,9 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
Opts.ExternalPassPipelineFilename = A->getValue();
|
||||
|
||||
Opts.GenerateProfile |= Args.hasArg(OPT_profile_generate);
|
||||
const Arg *ProfileUse = Args.getLastArg(OPT_profile_use);
|
||||
Opts.UseProfile = ProfileUse ? ProfileUse->getValue() : "";
|
||||
|
||||
Opts.EmitProfileCoverageMapping |= Args.hasArg(OPT_profile_coverage_mapping);
|
||||
Opts.EnableGuaranteedClosureContexts |=
|
||||
Args.hasArg(OPT_enable_guaranteed_closure_contexts);
|
||||
@@ -1639,6 +1642,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
}
|
||||
|
||||
Opts.GenerateProfile |= Args.hasArg(OPT_profile_generate);
|
||||
const Arg *ProfileUse = Args.getLastArg(OPT_profile_use);
|
||||
Opts.UseProfile = ProfileUse ? ProfileUse->getValue() : "";
|
||||
|
||||
Opts.PrintInlineTree |= Args.hasArg(OPT_print_llvm_inline_tree);
|
||||
|
||||
Opts.UseSwiftCall = Args.hasArg(OPT_enable_swiftcall);
|
||||
|
||||
Reference in New Issue
Block a user