mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #76532 from kavon/samplepgo
Add support for SamplePGO
This commit is contained in:
@@ -500,6 +500,13 @@ public:
|
||||
/// Path to the profdata file to be used for PGO, or the empty string.
|
||||
std::string UseProfile = "";
|
||||
|
||||
/// Path to the data file to be used for sampling-based PGO,
|
||||
/// or the empty string.
|
||||
std::string UseSampleProfile = "";
|
||||
|
||||
/// Controls whether DWARF discriminators are added to the IR.
|
||||
unsigned DebugInfoForProfiling : 1;
|
||||
|
||||
/// List of backend command-line options for -embed-bitcode.
|
||||
std::vector<uint8_t> CmdArgs;
|
||||
|
||||
@@ -584,7 +591,8 @@ public:
|
||||
ColocateTypeDescriptors(true), UseRelativeProtocolWitnessTables(false),
|
||||
UseFragileResilientProtocolWitnesses(false), EnableHotColdSplit(false),
|
||||
EmitAsyncFramePushPopMetadata(false), EmitYieldOnce2AsYieldOnce(true),
|
||||
AsyncFramePointerAll(false), UseProfilingMarkerThunks(false), CmdArgs(),
|
||||
AsyncFramePointerAll(false), UseProfilingMarkerThunks(false),
|
||||
DebugInfoForProfiling(false), CmdArgs(),
|
||||
SanitizeCoverage(llvm::SanitizerCoverageOptions()),
|
||||
TypeInfoFilter(TypeInfoDumpFilter::All),
|
||||
PlatformCCallingConvention(llvm::CallingConv::C), UseCASBackend(false),
|
||||
|
||||
@@ -1479,6 +1479,10 @@ def profile_generate : Flag<["-"], "profile-generate">,
|
||||
Flags<[FrontendOption, NoInteractiveOption]>,
|
||||
HelpText<"Generate instrumented code to collect execution counts">;
|
||||
|
||||
def debug_info_for_profiling : Flag<["-"], "debug-info-for-profiling">,
|
||||
Flags<[FrontendOption, NoInteractiveOption]>,
|
||||
HelpText<"Emit extra debug info (DWARF discriminators) to make sampling-based profiling more accurate">;
|
||||
|
||||
def profile_use : CommaJoined<["-"], "profile-use=">,
|
||||
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
|
||||
MetaVarName<"<profdata>">,
|
||||
@@ -1488,6 +1492,11 @@ def profile_coverage_mapping : Flag<["-"], "profile-coverage-mapping">,
|
||||
Flags<[FrontendOption, NoInteractiveOption]>,
|
||||
HelpText<"Generate coverage data for use with profiled execution counts">;
|
||||
|
||||
def profile_sample_use : CommaJoined<["-"], "profile-sample-use=">,
|
||||
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath]>,
|
||||
MetaVarName<"<profile data>">,
|
||||
HelpText<"Supply sampling-based profiling data from llvm-profdata to enable profile-guided optimization">;
|
||||
|
||||
def embed_bitcode : Flag<["-"], "embed-bitcode">,
|
||||
Flags<[FrontendOption, NoInteractiveOption]>,
|
||||
HelpText<"Embed LLVM IR bitcode as data">;
|
||||
|
||||
Reference in New Issue
Block a user