This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree 2 files changed +6
-11
lines changed 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,6 @@ fn local_place<'tcx>(
306
306
pub ( crate ) fn codegen_fn_prelude < ' tcx > (
307
307
fx : & mut FunctionCx < ' _ , ' tcx , impl Backend > ,
308
308
start_block : Block ,
309
- should_codegen_locals : bool ,
310
309
) {
311
310
let ssa_analyzed = crate :: analyze:: analyze ( fx) ;
312
311
@@ -424,17 +423,13 @@ pub(crate) fn codegen_fn_prelude<'tcx>(
424
423
}
425
424
}
426
425
427
- // HACK should_codegen_locals required for the ``implement `<Box<F> as FnOnce>::call_once`
428
- // without `alloca``` hack in `base::trans_fn`.
429
- if should_codegen_locals {
430
- for local in fx. mir . vars_and_temps_iter ( ) {
431
- let ty = fx. monomorphize ( & fx. mir . local_decls [ local] . ty ) ;
432
- let layout = fx. layout_of ( ty) ;
426
+ for local in fx. mir . vars_and_temps_iter ( ) {
427
+ let ty = fx. monomorphize ( & fx. mir . local_decls [ local] . ty ) ;
428
+ let layout = fx. layout_of ( ty) ;
433
429
434
- let is_ssa = ssa_analyzed[ local] == crate :: analyze:: SsaKind :: Ssa ;
430
+ let is_ssa = ssa_analyzed[ local] == crate :: analyze:: SsaKind :: Ssa ;
435
431
436
- local_place ( fx, local, layout, is_ssa) ;
437
- }
432
+ local_place ( fx, local, layout, is_ssa) ;
438
433
}
439
434
440
435
fx. bcx
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ pub(crate) fn trans_fn<'tcx, B: Backend + 'static>(
61
61
crate :: trap:: trap_unreachable ( & mut fx, "function has uninhabited argument" ) ;
62
62
} else {
63
63
tcx. sess . time ( "codegen clif ir" , || {
64
- tcx. sess . time ( "codegen prelude" , || crate :: abi:: codegen_fn_prelude ( & mut fx, start_block, true ) ) ;
64
+ tcx. sess . time ( "codegen prelude" , || crate :: abi:: codegen_fn_prelude ( & mut fx, start_block) ) ;
65
65
codegen_fn_content ( & mut fx) ;
66
66
} ) ;
67
67
}
You can’t perform that action at this time.
0 commit comments