Stream: t-compiler

Topic: replacing mir-opt with UI


eddyb (Apr 23 2019 at 07:50, on Zulip):

@oli and I are considering -Zprint-mir-{before,after]=Pass that emits something like e.g. https://github.com/rust-lang/rust/blob/master/src/test/mir-opt/inline-closure.rs#L15 (in that case, you'd pass -Zprint-mir-after=Inline, maybe also filtering by foo, but the syntax for that is bikesheddy)

then we can use UI tests and --bless instead of the mir-opt mode in compiletest (which is really slow, see https://github.com/rust-lang/rust/issues/58485#issuecomment-485673688)

cc @nikomatsakis @pnkfelix

pnkfelix (Apr 23 2019 at 14:30, on Zulip):

In theory don’t the mir-opt mode tests allow one to omit statements, which this would not? That may be or may not be a net boon.

oli (Apr 23 2019 at 14:42, on Zulip):

it'll be noisier, but the fact that we can use --bless makes this not a pain point for unrelated changes.

nikomatsakis (Apr 23 2019 at 21:44, on Zulip):

I am all in favor of leveraging UI tests more

nikomatsakis (Apr 23 2019 at 21:44, on Zulip):

and having fewer random modes

nikomatsakis (Apr 23 2019 at 21:44, on Zulip):

my main concern though is that if the output has too much crap

nikomatsakis (Apr 23 2019 at 21:44, on Zulip):

it might be hard to know what the important bits are?

nikomatsakis (Apr 23 2019 at 21:45, on Zulip):

i.e., you see some diffs, but did you disable the optimization or not?

nikomatsakis (Apr 23 2019 at 21:45, on Zulip):

but maybe we can use //~ ERROR to help with that?

nikomatsakis (Apr 23 2019 at 21:45, on Zulip):

not sure how :)

nikomatsakis (Apr 23 2019 at 21:46, on Zulip):

I do like the general model of UI tests, where we have --bless that needs to be reviewed, but we use //~ ERROR to try to set a "lower bar" to how much you can behavior you can bless without any manual intervention :)

nikomatsakis (Apr 23 2019 at 21:46, on Zulip):

so I guess the question is what form that lower bar might take for mir-opt

nikomatsakis (Apr 23 2019 at 21:46, on Zulip):

I'd be ok with just porting to UI tests for now and seeing if we have a problem, tho

Last update: Nov 22 2019 at 05:05UTC