Open
Description
This is a tracking issue for the MIR inliner. You can currently enable it by passing -Zinline-mir
or -Zmir-opt-level=3
to the compiler (although that also enables a bunch of other opts)
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- make
#[inline(always)]
work even inmir-opt-level=1
(mir-opt-level=0 is just a debugging feature, not meant to ever be exposed to users) - ICE: broken mir with -Zinline-mir issue-50865-private-impl-trait/auxiliary/lib.rs #78442
- ICE: Encountered error .. selecting .. #81403
- ICE in src/test/ui/issues/issue-74614.rs if MIR inlining is enabled #81788
- Debug info after MIR inlining losses track which variables represent arguments #83217
Implementation history
- Prevent query cycles in the MIR inliner #68828 detects recursive functions that previously caused the inliner to cause query cycles
- Add flags customizing behaviour of MIR inlining #78873 adds
-Z
flags for tuning the MIR inliner heuristic - Enable MIR inlining #91743 enables mir inlining on stable
cc @rust-lang/wg-mir-opt