-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove _all_ codegen dependencies on rustc_mir
🎉
#61062
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
All tests passing locally now :) |
src/librustc_monomorphize/lib.rs
Outdated
} | ||
} | ||
|
||
pub fn custom_coerce_unsize_info<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @oli-obk Surely this could be somewhere that miri would also benefit from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since librustc_monomorphize
is a dependency of librustc_mir
, that should be easy enough
Looks like the non-reexport items are mostly extension traits. We should figure out a way to break the dependency without necessarily moving the code out of |
@eddyb I think I addressed most of your review concerns.
I thought about this a bit. It might also be possible to move them to |
In fact, that may also enable moving parts of |
@mark-i-m I quickly looked at it, and both |
@eddyb yes, but that trait uses this one. |
@mark-i-m Yes, but not in a way which needs |
@eddyb Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all the changes seemed to have been a success, can we keep monomorphize
in rustc_mir
now, and still get the benefits of codegen not depending on rustc_mir
😁?
@eddyb Yes, I will move monomorphize back to rustc_mir. However, there is still one there is still one dependency from |
|
r? @oli-obk for |
rustc_mir
@eddyb Rebased and addressed nit. Unfortunately, someone added another dependency on rustc_mir in the meantime (on |
Also, I'm glad to address nits, but if we could do it in a followup PR, that would be great, as this rebase was painful... |
@bors r=eddyb,oli-obk p=1
|
📌 Commit 0f822d7 has been approved by |
Remove _all_ codegen dependencies on `rustc_mir` 🎉 ~This code is pretty self-contained. It has no references to the rest of `rustc_mir`. Moving it to its own crate means that almost all of the references from `rustc_codegen_*` to `rustc_mir` are instead moved to `rustc_monomorphize`, which should help improve compile times for the compiler a bit...~ With the help of eddyb and oli-obk, all of the dependencies of `librustc_codegen_*` on `librustc_mir` have been removed: - dependencies on `rustc_mir::monomorphize` were moved to `rustc::mir::mono` - `rustc_mir::const_eval::const_field` is made into a query. - `rustc_mir::interpret::type_name` is made into a query. This should help reduce compile time when working on `rustc_mir` 🕐 cc #47849 r? @eddyb
☀️ Test successful - checks-travis, status-appveyor |
@oli-obk We should probably put miri intrinsics behind |
so... const fns with zero arguments and constants become indistinguishable? |
This code is pretty self-contained. It has no references to the rest ofrustc_mir
. Moving it to its own crate means that almost all of the references fromrustc_codegen_*
torustc_mir
are instead moved torustc_monomorphize
, which should help improve compile times for the compiler a bit...With the help of eddyb and oli-obk, all of the dependencies of
librustc_codegen_*
onlibrustc_mir
have been removed:rustc_mir::monomorphize
were moved torustc::mir::mono
rustc_mir::const_eval::const_field
is made into a query.rustc_mir::interpret::type_name
is made into a query.This should help reduce compile time when working on
rustc_mir
🕐cc #47849
r? @eddyb