Stream: t-compiler/wg-mir-opt

Topic: Existing MIR-opts & documentation


Félix Fischer (Apr 27 2020 at 17:01, on Zulip):

Hellu all. I'd like to know if we have a list of the mir-opts that have been implemented, and if we have written down at what state they're in. I'd like to document all of this information, and try to give an overview of:

  1. Where we're at in each topic (e.g. "const-prop (...) isn't yet aware of control flow, but it propagates locals restricted to their containing blocks)". "copy prop needs more tests". "X is working on optimizing their NRVO implementation"
  2. What do the transforms do.
  3. What is the complexity of the transforms (time and memory)
  4. Explain for each transform, why it is (or should be) sound.
Wesley Wiser (Apr 27 2020 at 20:18, on Zulip):

I'm not aware of where that might be. I think there is a very small amount of documentation in the rustc dev guide which would probably be the ideal place to flesh that kind of content out.

Félix Fischer (Apr 28 2020 at 04:13, on Zulip):

Indeed, there is a little bit of documentation on them: https://rustc-dev-guide.rust-lang.org/mir/optimizations.html
It sounds like a good place to start going deeper into it, if it doesn't exist anywhere else :)

Félix Fischer (Apr 28 2020 at 04:15, on Zulip):

The #implementors documentation also seems like a good place to put in some docs maybe, in the form of doc comments: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/trait.MirPass.html#implementors

Last update: Sep 28 2020 at 16:00UTC