Stream: t-compiler/wg-mir-opt

Topic: optimizations

Félix Fischer (Mar 11 2019 at 01:15, on Zulip):

This is a re-thinking of a question I asked in the Discord: what optimizations happen at MIR? Does constant propagation happen here, or is that job done at the LLVM-IR level only?

nagisa (Mar 11 2019 at 01:18, on Zulip):

There is some constant propagation, IIRC (miri) and there is potential for more.

Félix Fischer (Mar 11 2019 at 01:21, on Zulip):

Nice! Is this documented somewhere? Maybe in RFCs? If you have a keyword I can use to look for PRs at the rustc repo, that would do as well :)

oli (Mar 11 2019 at 09:30, on Zulip):

The constant propagation code is in but it only lints if propagation would fail (aka there'd be a panic at runtime), it doesn't actually propagate right now

oli (Mar 11 2019 at 09:30, on Zulip):

It's also very limited, as it doesn't understand if and match right now

Félix Fischer (Mar 12 2019 at 03:31, on Zulip):

So if I understood correctly, there's some pieces of the c.p. implemented but it's not propagating anything atm?

oli (Mar 12 2019 at 10:38, on Zulip):

Yes, iirc there were performance concerns. We should investigate those.

Last update: Sep 27 2020 at 13:30UTC