rustc-dev-guide icon indicating copy to clipboard operation
rustc-dev-guide copied to clipboard

document MIR-optimizations

Open JohnTitor opened this issue 5 years ago • 4 comments

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 avatar Jun 07 '19 07:06 JohnTitor

@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 avatar Jun 07 '19 16:06 mark-i-m

@mark-i-m Yes, I'll work on this. But it may take some time to come up with the suitable content.

JohnTitor avatar Jun 07 '19 18:06 JohnTitor

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

oli-obk avatar Nov 11 '19 11:11 oli-obk

I've opened https://github.com/rust-lang/rustc-guide/issues/517 which is related :)

spastorino avatar Nov 14 '19 21:11 spastorino