Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b141564

Browse files
committedOct 13, 2024
Auto merge of #131650 - saethlin:post-mono-mir-opts, r=<try>
Add post-mono MIR passes to make mono-reachable analysis more accurate r? ghost
2 parents 3678036 + a211812 commit b141564

File tree

49 files changed

+323
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+323
-393
lines changed
 

‎compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(crate) fn codegen_fn<'tcx>(
4141
let symbol_name = tcx.symbol_name(instance).name.to_string();
4242
let _timer = tcx.prof.generic_activity_with_arg("codegen fn", &*symbol_name);
4343

44-
let mir = tcx.instance_mir(instance.def);
44+
let mir = tcx.build_codegen_mir(instance);
4545
let _mir_guard = crate::PrintOnPanic(|| {
4646
let mut buf = Vec::new();
4747
with_no_trimmed_paths!({

‎compiler/rustc_codegen_ssa/src/mir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
167167

168168
let llfn = cx.get_fn(instance);
169169

170-
let mir = cx.tcx().instance_mir(instance.def);
170+
let mir = cx.tcx().build_codegen_mir(instance);
171171

172172
let fn_abi = cx.fn_abi_of_instance(instance, ty::List::empty());
173173
debug!("fn_abi: {:?}", fn_abi);

0 commit comments

Comments
 (0)
Please sign in to comment.