Stream: t-compiler

Topic: always error on query cycles


Zoxc (Jan 24 2019 at 16:51, on Zulip):

I want to change the query system so that a query cycle always result in an error. Currently the only exception is MIR inlining. It tries to get an optimized MIR and doesn't inline if a cycle occurred. This isn't really ideal for a number of reasons and I'd like to change it to use the unoptimized MIR for now. Long term I'd expect us to have a single query which handles inlining + MIR optimizations on the entire crate which does it's own cycle checking. cc @Wesley Wiser

Wesley Wiser (Jan 24 2019 at 16:53, on Zulip):

MIR inlining is totally unstable and @nikomatsakis wants to change it compute an SCC graph anyway.

Wesley Wiser (Jan 24 2019 at 16:53, on Zulip):

I'd like to change it to use the unoptimized MIR for now

I'd say go for it!

rkruppe (Jan 24 2019 at 17:11, on Zulip):

for reference https://github.com/rust-lang/rust/issues/43542

nikomatsakis (Jan 24 2019 at 17:18, on Zulip):

I am strongly in favor of this, @Zoxc

nikomatsakis (Jan 24 2019 at 17:18, on Zulip):

it has been the plan for some time, just nobody got around to it basically

Zoxc (Jan 24 2019 at 17:19, on Zulip):

I'll make a PR then

nikomatsakis (Jan 24 2019 at 17:19, on Zulip):

I think your sol'n (unopt mir) is ok for now

nikomatsakis (Jan 24 2019 at 17:19, on Zulip):

as @Wesley Wiser said I had a vague plan to compute SCCs etc but... wev

mw (Jan 25 2019 at 08:31, on Zulip):

+1 from me

Zoxc (Jan 26 2019 at 10:21, on Zulip):

I forgot that we don't have an unoptimized MIR. Would inlining just from other crates suffice? We can also allow functions earlier in the crate in non-incremental mode (which would be useful for testing)

cc @Wesley Wiser @nikomatsakis

Last update: Nov 22 2019 at 05:40UTC