-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustc_mir: hardcode pass list internally and remove premature pluggability. #45916
Conversation
@bors r+ |
📌 Commit 9eadc36 has been approved by |
Please dont do this as this would make it very hard to update holyjit for the latest nightly. Currently it just requires a rustc patch of a few lines. |
@bjorn3 See this PR's description for the appropriate course of action. Being able to replace the provider for, e.g., the |
I see. Should have read the description completely. |
@bjorn3 Thanks for your concern for HolyJit. Yes this patch is going to break the ability to simply rebase a patch on top of rustc, but HolyJit is a prototype, and I have been warned and explicitly been suggested against using a plugin approach from the beginning. I still went with the plugin approach because this is something I understand and which was close enough to what is currently documented for making syntax plugins. |
☔ The latest upstream changes (presumably #45909) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=nikomatsakis |
📌 Commit d6aa56f has been approved by |
rustc_mir: hardcode pass list internally and remove premature pluggability. Fixes #41712 by moving the MIR pass lists from `rustc_driver` to `rustc_mir`. The application of the passes is done with the `rustc_mir::transform::run_passes` macro, which is public, as are all the passes AFAIK, and can be used to apply MIR passes outside of `rustc_mir`. With the ability to override query providers through the `rustc_driver` (orthogonal to, and not included in this PR), custom drivers will be able to substitute the entire pass list if they want to. **EDIT**: the aforementioned ability is added by #45944. r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
Fixes #41712 by moving the MIR pass lists from
rustc_driver
torustc_mir
.The application of the passes is done with the
rustc_mir::transform::run_passes
macro, which is public, as are all the passes AFAIK, and can be used to apply MIR passes outside ofrustc_mir
.With the ability to override query providers through the
rustc_driver
(orthogonal to, and not included in this PR), custom drivers will be able to substitute the entire pass list if they want to.EDIT: the aforementioned ability is added by #45944.
r? @nikomatsakis