Stream: t-compiler/wg-mir-opt

Topic: Generating arbitrary MIR


Nathan Corbyn (Jun 09 2020 at 10:06, on Zulip):

I'm very interested in finding out what people's opinions are on approaches to resolving https://github.com/rust-lang/miri/issues/196

Nathan Corbyn (Jun 09 2020 at 10:06, on Zulip):

The most naive approach (and most labour intensive) would be to build a dedicated MIR front-end right?

Nathan Corbyn (Jun 09 2020 at 10:07, on Zulip):

Would that ever be worthwhile?

Félix Fischer (Jun 09 2020 at 20:18, on Zulip):

I mean that would be pretty sweet

Félix Fischer (Jun 09 2020 at 20:18, on Zulip):

That would also probably help us testing the soundness of the MIR-opt transforms

Jonas Schievink (Jun 09 2020 at 20:19, on Zulip):

I suspect that we might end up with something like that as part of the Sealed Rust effort, but probably only in a couple of years

Nathan Corbyn (Jun 09 2020 at 20:20, on Zulip):

Sealed Rust?

Nathan Corbyn (Jun 09 2020 at 20:20, on Zulip):

Ahhhh

Nathan Corbyn (Jun 09 2020 at 20:20, on Zulip):

Like no-source libraries?

Wesley Wiser (Jun 09 2020 at 20:20, on Zulip):

https://ferrous-systems.com/blog/sealed-rust-the-pitch/

Nathan Corbyn (Jun 09 2020 at 20:21, on Zulip):

Thanks!

Wesley Wiser (Jun 09 2020 at 20:21, on Zulip):

I think it could be useful for negative testing of MIR-optimizations

Wesley Wiser (Jun 09 2020 at 20:22, on Zulip):

Like "given this weird MIR that's really difficult to generate from Rust, the optimization doesn't do the wrong thing"

Wesley Wiser (Jun 09 2020 at 20:23, on Zulip):

But it doesn't seem a huge priority to me

Nathan Corbyn (Jun 09 2020 at 20:25, on Zulip):

Thinking about it, it would be something that should be fairly easy to build incrementally

Nathan Corbyn (Jun 09 2020 at 20:25, on Zulip):

And could be done as part of the ramp up for Sealed Rust?

Wesley Wiser (Jun 09 2020 at 20:27, on Zulip):

Yeah, I think there are uses for it and some people would certainly like to have it, but I don't know it's something the compiler team would focus on in the next year or so

Wesley Wiser (Jun 09 2020 at 20:27, on Zulip):

That's my personal opinion

oli (Jun 09 2020 at 20:28, on Zulip):

yea, you could totally start out with just a parser extension that adds mir foo(x: type) -> ret_type syntax and incrementally add features step by step. The easiest way to gauge whether it's worthwile to pursue without putting a lot of work into it is to write an MCP to the compiler team with a plan for how to do this

Nathan Corbyn (Jun 09 2020 at 20:31, on Zulip):

Ok I'll give that a go! Thanks Oli!

Last update: Sep 28 2020 at 16:00UTC