Skip to content

Commit ef5ab90

Browse files
-Z inline_mir is a bool
1 parent f75a9ef commit ef5ab90

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ fn test_debugging_options_tracking_hash() {
731731
tracked!(function_sections, Some(false));
732732
tracked!(human_readable_cgu_names, true);
733733
tracked!(inline_in_all_cgus, Some(true));
734-
tracked!(inline_mir, Some(true));
734+
tracked!(inline_mir, true);
735735
tracked!(inline_mir_hint_threshold, Some(123));
736736
tracked!(inline_mir_threshold, Some(123));
737737
tracked!(instrument_coverage, Some(InstrumentCoverage::All));

compiler/rustc_mir_transform/src/inline.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ struct CallSite<'tcx> {
3939

4040
/// Returns true if MIR inlining is enabled in the current compilation session.
4141
crate fn is_enabled(tcx: TyCtxt<'_>) -> bool {
42-
if let Some(enabled) = tcx.sess.opts.debugging_opts.inline_mir {
43-
return enabled;
44-
}
45-
46-
tcx.sess.mir_opt_level() >= 3
42+
tcx.sess.opts.debugging_opts.inline_mir && tcx.sess.mir_opt_level() >= 3
4743
}
4844

4945
impl<'tcx> MirPass<'tcx> for Inline {

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ options! {
11681168
"hash spans relative to their parent item for incr. comp. (default: no)"),
11691169
incremental_verify_ich: bool = (false, parse_bool, [UNTRACKED],
11701170
"verify incr. comp. hashes of green query instances (default: no)"),
1171-
inline_mir: Option<bool> = (None, parse_opt_bool, [TRACKED],
1171+
inline_mir: bool = (false, parse_bool, [TRACKED],
11721172
"enable MIR inlining (default: no)"),
11731173
inline_mir_threshold: Option<usize> = (None, parse_opt_number, [TRACKED],
11741174
"a default MIR inlining threshold (default: 50)"),

0 commit comments

Comments
 (0)