Skip to content

[IRGen] Introduce OptimizedIRRequest #32914

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
merged 8 commits into from
Jul 16, 2020

Conversation

hamishknight
Copy link
Contributor

Introduce a request that returns the optimized IR for a whole-module or file, and use it in SILLLVMGen. For now this manually wraps the entire compiler pipeline, but eventually will be able to just call into IRGen.

This will avoid needing to recreate it when we
come to perform LLVM passes.
This will allow it to better interact with the
SILGen descriptor.
The LLVM passes we apply don't depend on the language
version, only the compiler version.
This seems like something we want to always do, not
just when emitting the LLVM module.
Factor out the logic that deals with the LLVM
passes for compiling and emitting the module.
Remove the side-effecting call from IRGenRequest,
instead requiring callers to handle the optimization
and emission of the LLVM module.
Introduce a request that wraps the entire compiler
pipeline and returns the optimized IR for a
whole-module or file.
@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

I like where this is going. Swift LGTM.

@swiftlang swiftlang deleted a comment from swift-ci Jul 16, 2020
@swiftlang swiftlang deleted a comment from swift-ci Jul 16, 2020
@hamishknight
Copy link
Contributor Author

swiftlang/llvm-project#1469

@swift-ci please test

@hamishknight hamishknight merged commit bcb6699 into swiftlang:master Jul 16, 2020
@hamishknight hamishknight deleted the a-series-of-tubes branch July 16, 2020 19:03
hamishknight added a commit to swiftlang/llvm-project that referenced this pull request Jul 16, 2020
hamishknight added a commit to swiftlang/llvm-project that referenced this pull request Jul 21, 2020
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