Skip to content

[SIL] Enabled printing canonical module. #39393

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

Merged

Conversation

nate-chandler
Copy link
Contributor

To print the module, use the new llvm flag -sil-print-guaranteed-module which parallels the existing flag -sil-view-guaranteed-cfg. When that flag is passed, the new pass ModulePrinter is added to the diagnostic pass pipeline after mandatory diagnostics have run. The new pass just prints the module to stdout.

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although you might reconsider the name. If you really want to print at the transition to canonical sil stage, then I would call it (and the view option) -sil-print-canonical-module

@nate-chandler nate-chandler force-pushed the sil/print-guaranteed-module branch from 0c1e0f1 to d787c2b Compare September 22, 2021 19:35
Previously, the flag was named -sil-view-guaranteed-cfg.  Here, it's
renamed to -sil-view-canonical-cfg.
To print the module, use the new llvm flag -sil-print-canonical-module
which parallels the existing flag -sil-view-canonical-cfg.  When that
flag is passed, the new pass ModulePrinter is added to the diagnostic
pass pipeline after mandatory diagnostics have run.  The new pass just
prints the module to stdout.
@nate-chandler nate-chandler force-pushed the sil/print-guaranteed-module branch from d787c2b to 4ff34aa Compare September 22, 2021 19:36
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@atrick Changed the wording. So the preexisting flag is now sil-view-canonical-cfg and the added flag is sil-print-canonical-module. Is that what you had in mind?

@nate-chandler nate-chandler changed the title [SIL] Enabled printing guaranteed module. [SIL] Enabled printing canonical module. Sep 22, 2021
@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

2 similar comments
@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler nate-chandler merged commit 28daeae into swiftlang:main Sep 27, 2021
@nate-chandler nate-chandler deleted the sil/print-guaranteed-module branch September 27, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants