rustc-dev-guide
rustc-dev-guide copied to clipboard
document MIR-optimizations
Original discussion is in Zulip.
At now, src/mir/optimizations.md
is empty so we should document MIR-optimizations.
oli-obk pointed out these:
- guaranteed and required ones
- some that don't optimize, but just check stuff
- some that are only turned on in release mode
@JohnTitor Would you be interested in submitting a PR to add these. Frankly, outside the WG-mir-opt, there are probably not many people qualified to write it.
@mark-i-m Yes, I'll work on this. But it may take some time to come up with the suitable content.
The list of mir optimizations inside the compiler can be found at https://github.com/rust-lang/rust/blob/2a9be46cc4b5aa09e978653aba071c7c52b531eb/src/librustc_mir/transform/mod.rs#L232-L282
I've opened https://github.com/rust-lang/rustc-guide/issues/517 which is related :)