-
Notifications
You must be signed in to change notification settings - Fork 218
Adds IR level PGO Instrumentation options #1992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -258,9 +258,7 @@ extension DarwinToolchain { | |
| fileSystem: fileSystem | ||
| ) | ||
|
|
||
| if parsedOptions.hasArgument(.profileGenerate) { | ||
| commandLine.appendFlag("-fprofile-generate") | ||
| } | ||
|
Comment on lines
-261
to
-263
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels like a bug to me. As I understand, Swift's
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this behavior is existing in swift-driver today, and I’m a bit wary of changing it here because there may be tests and downstream flows that rely on it. This PR is primarily adding the new pieces, that said, if you feel it’s worth addressing this legacy behavior in the same PR, please let me know and I can look into it. |
||
| commandLine.appendFlags(mapInstrumentationTypeToClangArgs(from: &parsedOptions)) | ||
|
|
||
| // These custom arguments should be right before the object file at the | ||
| // end. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -243,6 +243,11 @@ extension Driver { | |
| try commandLine.appendLast(.RpassMissedEQ, from: &parsedOptions) | ||
| try commandLine.appendLast(.suppressWarnings, from: &parsedOptions) | ||
| try commandLine.appendLast(.profileGenerate, from: &parsedOptions) | ||
| try commandLine.appendLast(.irProfileGenerate, from: &parsedOptions) | ||
| try commandLine.appendLast(.irProfileGenerateEQ, from: &parsedOptions) | ||
| try commandLine.appendLast(.irProfileUse, from: &parsedOptions) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a flag that points to the file. It needs path remapping if needed. Use Also means this is not handled correctly in swift-frontend/scanner. See the comment I added to the other review.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @cachemeifyoucan for looking into it. Are you suggesting something as follows On trying the above, I get a fatalError in CommandLineArguments.appendFlag function I think the option
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @cachemeifyoucan / @drodriguez ,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand the why of the request from @cachemeifyoucan . I cannot help with that. I think |
||
| try commandLine.appendLast(.csProfileGenerate, from: &parsedOptions) | ||
| try commandLine.appendLast(.csProfileGenerateEQ, from: &parsedOptions) | ||
| try commandLine.appendLast(.profileUse, from: &parsedOptions) | ||
| try commandLine.appendLast(.profileCoverageMapping, from: &parsedOptions) | ||
| try commandLine.appendLast(.debugInfoForProfiling, from: &parsedOptions) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.