rust/compiler/rustc_middle
bors f4eb5d9f71 Auto merge of #68828 - oli-obk:inline_cycle, r=wesleywiser
Prevent query cycles in the MIR inliner

r? `@eddyb` `@wesleywiser`

cc `@rust-lang/wg-mir-opt`

The general design is that we have a new query that is run on the `validated_mir` instead of on the `optimized_mir`. That query is forced before going into the optimization pipeline, so as to not try to read from a stolen MIR.

The query should not be cached cross crate, as you should never call it for items from other crates. By its very design calls into other crates can never cause query cycles.

This is a pessimistic approach to inlining, since we strictly have more calls in the `validated_mir` than we have in `optimized_mir`, but that's not a problem imo.
2021-01-25 19:03:37 +00:00
..
benches mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
src Auto merge of #68828 - oli-obk:inline_cycle, r=wesleywiser 2021-01-25 19:03:37 +00:00
Cargo.toml Create rustc_ty_library 2020-12-02 20:28:41 +01:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

For more information about how rustc works, see the rustc dev guide.