From 2b0fba69162ecf976e2df8c5315188075967cb43 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 19 Dec 2024 01:14:12 +0000 Subject: [PATCH] Perf test for ensuring drops-elaborated MIR --- compiler/rustc_interface/src/passes.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 02905e632ab87..d4184741a87ee 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -884,7 +884,7 @@ fn run_required_analyses(tcx: TyCtxt<'_>) { // Run unsafety check because it's responsible for stealing and // deallocating THIR. tcx.ensure().check_unsafety(def_id); - tcx.ensure().mir_borrowck(def_id) + tcx.ensure().mir_borrowck(def_id); }); }); sess.time("MIR_effect_checking", || { @@ -909,6 +909,11 @@ fn run_required_analyses(tcx: TyCtxt<'_>) { ); } }); + sess.time("ensuring_MIR_drops_elaborated", || { + tcx.hir().par_body_owners(|def_id| { + tcx.ensure().mir_drops_elaborated_and_const_checked(def_id); + }); + }); sess.time("layout_testing", || layout_test::test_layout(tcx)); sess.time("abi_testing", || abi_test::test_abi(tcx));