Skip to content

Commit

Permalink
Unrolled build for rust-lang#128851
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#128851 - compiler-errors:validate-mir-opt-mir, r=matthiaskrgr

Add comment that bors did not see pushed before it merged

In rust-lang#128612, bors merged 470ada2 instead of 1e07c19.

This means it dropped a useful comment I added, and a stage rename that is more descriptive.
  • Loading branch information
rust-timer committed Aug 9, 2024
2 parents c7b0d4e + 524e768 commit 4274a1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion compiler/rustc_interface/src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,14 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
});
sess.time("layout_testing", || layout_test::test_layout(tcx));
sess.time("abi_testing", || abi_test::test_abi(tcx));

// If `-Zvalidate-mir` is set, we also want to compute the final MIR for each item
// (either its `mir_for_ctfe` or `optimized_mir`) since that helps uncover any bugs
// in MIR optimizations that may only be reachable through codegen, or other codepaths
// that requires the optimized/ctfe MIR, such as polymorphization, coroutine bodies,
// or evaluating consts.
if tcx.sess.opts.unstable_opts.validate_mir {
sess.time("ensuring_optimized_MIR_is_computable", || {
sess.time("ensuring_final_MIR_is_computable", || {
tcx.hir().par_body_owners(|def_id| {
tcx.instance_mir(ty::InstanceKind::Item(def_id.into()));
});
Expand Down

0 comments on commit 4274a1a

Please sign in to comment.