Rollup merge of #82376 - tmiasko:inline-options, r=oli-obk
Add option to enable MIR inlining independently of mir-opt-level Add `-Zinline-mir` option that enables MIR inlining independently of the current MIR opt level. The primary use-case is enabling MIR inlining on the default MIR opt level. Turn inlining thresholds into optional values to make it possible to configure different defaults depending on the current mir-opt-level (although thresholds are yet to be used in such a manner).
This commit is contained in:
@@ -430,8 +430,7 @@ fn mir_drops_elaborated_and_const_checked<'tcx>(
|
||||
let def = ty::WithOptConstParam::unknown(did);
|
||||
|
||||
// Do not compute the mir call graph without said call graph actually being used.
|
||||
// Keep this in sync with the mir inliner's optimization level.
|
||||
if tcx.sess.opts.debugging_opts.mir_opt_level >= 2 {
|
||||
if inline::is_enabled(tcx) {
|
||||
let _ = tcx.mir_inliner_callees(ty::InstanceDef::Item(def));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user