@@ -688,7 +688,7 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
688
688
body
689
689
}
690
690
691
- pub fn build_codegen_mir < ' tcx > ( tcx : TyCtxt < ' tcx > , instance : Instance < ' tcx > ) -> & ' tcx Body < ' tcx > {
691
+ pub fn build_codegen_mir < ' tcx > ( tcx : TyCtxt < ' tcx > , instance : Instance < ' tcx > ) -> Body < ' tcx > {
692
692
let body = tcx. instance_mir ( instance. def ) ;
693
693
let mut body = instance. instantiate_mir_and_normalize_erasing_regions (
694
694
tcx,
@@ -705,19 +705,19 @@ pub fn build_codegen_mir<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> &
705
705
// failures. So we rely on the fact that validation only runs after passes? It's
706
706
// probably better to just delete that validation check.
707
707
& abort_unwinding_calls:: AbortUnwindingCalls ,
708
- & o1 ( gvn:: GVN :: PostMono ) ,
708
+ & gvn:: GVN :: PostMono ,
709
709
// FIXME: Enabling this InstSimplify is required to fix the MIR from the
710
710
// unreachable_unchecked precondition check that UnreachablePropagation creates, but
711
711
// also enabling it breaks tests/codegen/issues/issue-122600-ptr-discriminant-update.rs
712
712
// LLVM appears to handle switches on i64 better than it handles icmp eq + br.
713
- & o1 ( instsimplify:: InstSimplify :: PostMono ) ,
713
+ & instsimplify:: InstSimplify :: PostMono ,
714
714
& o1 ( simplify_branches:: SimplifyConstCondition :: PostMono ) ,
715
715
& o1 ( simplify:: SimplifyCfg :: PostMono ) ,
716
716
& add_call_guards:: CriticalCallEdges ,
717
717
] ,
718
718
Some ( MirPhase :: Runtime ( RuntimePhase :: Codegen ) ) ,
719
719
) ;
720
- tcx . arena . alloc ( body)
720
+ body
721
721
}
722
722
723
723
/// Fetch all the promoteds of an item and prepare their MIR bodies to be ready for
0 commit comments