Remove _all_ codegen dependencies on rustc_mir 🎉#61062
Remove _all_ codegen dependencies on rustc_mir 🎉#61062bors merged 12 commits intorust-lang:masterfrom
rustc_mir 🎉#61062Conversation
|
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
There was a problem hiding this comment.
cc @oli-obk Surely this could be somewhere that miri would also benefit from?
There was a problem hiding this comment.
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. |
eddyb
left a comment
There was a problem hiding this comment.
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_mirare 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_mirhave been removed:rustc_mir::monomorphizewere moved torustc::mir::monorustc_mir::const_eval::const_fieldis made into a query.rustc_mir::interpret::type_nameis made into a query.This should help reduce compile time when working on
rustc_mir🕐cc #47849
r? @eddyb