@@ -688,7 +688,7 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
688688 body
689689}
690690
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 > {
692692 let body = tcx. instance_mir ( instance. def ) ;
693693 let mut body = instance. instantiate_mir_and_normalize_erasing_regions (
694694 tcx,
@@ -705,19 +705,19 @@ pub fn build_codegen_mir<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> &
705705 // failures. So we rely on the fact that validation only runs after passes? It's
706706 // probably better to just delete that validation check.
707707 & abort_unwinding_calls:: AbortUnwindingCalls ,
708- & o1 ( gvn:: GVN :: PostMono ) ,
708+ & gvn:: GVN :: PostMono ,
709709 // FIXME: Enabling this InstSimplify is required to fix the MIR from the
710710 // unreachable_unchecked precondition check that UnreachablePropagation creates, but
711711 // also enabling it breaks tests/codegen/issues/issue-122600-ptr-discriminant-update.rs
712712 // LLVM appears to handle switches on i64 better than it handles icmp eq + br.
713- & o1 ( instsimplify:: InstSimplify :: PostMono ) ,
713+ & instsimplify:: InstSimplify :: PostMono ,
714714 & o1 ( simplify_branches:: SimplifyConstCondition :: PostMono ) ,
715715 & o1 ( simplify:: SimplifyCfg :: PostMono ) ,
716716 & add_call_guards:: CriticalCallEdges ,
717717 ] ,
718718 Some ( MirPhase :: Runtime ( RuntimePhase :: Codegen ) ) ,
719719 ) ;
720- tcx . arena . alloc ( body)
720+ body
721721}
722722
723723/// Fetch all the promoteds of an item and prepare their MIR bodies to be ready for
0 commit comments