File tree 1 file changed +7
-1
lines changed
compiler/rustc_interface/src
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -818,8 +818,14 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
818
818
} ) ;
819
819
sess. time ( "layout_testing" , || layout_test:: test_layout ( tcx) ) ;
820
820
sess. time ( "abi_testing" , || abi_test:: test_abi ( tcx) ) ;
821
+
822
+ // If `-Zvalidate-mir` is set, we also want to compute the final MIR for each item
823
+ // (either its `mir_for_ctfe` or `optimized_mir`) since that helps uncover any bugs
824
+ // in MIR optimizations that may only be reachable through codegen, or other codepaths
825
+ // that requires the optimized/ctfe MIR, such as polymorphization, coroutine bodies,
826
+ // or evaluating consts.
821
827
if tcx. sess . opts . unstable_opts . validate_mir {
822
- sess. time ( "ensuring_optimized_MIR_is_computable " , || {
828
+ sess. time ( "ensuring_final_MIR_is_computable " , || {
823
829
tcx. hir ( ) . par_body_owners ( |def_id| {
824
830
tcx. instance_mir ( ty:: InstanceKind :: Item ( def_id. into ( ) ) ) ;
825
831
} ) ;
You can’t perform that action at this time.
0 commit comments