Rollup merge of #121147 - tmiasko:no-debug-body, r=compiler-errors

Avoid debug logging entire MIR body

If there is a need to examine the MIR body there is -Zmir-dump.
This commit is contained in:
Guillaume Gomez 2024-02-16 00:27:35 +01:00 committed by GitHub
commit e84a1dd87f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -653,7 +653,6 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
debug!("about to call mir_drops_elaborated...");
let body = tcx.mir_drops_elaborated_and_const_checked(did).steal();
let mut body = remap_mir_for_const_eval_select(tcx, body, hir::Constness::NotConst);
debug!("body: {:#?}", body);
if body.tainted_by_errors.is_some() {
return body;

View File

@ -15,7 +15,8 @@ fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
}
fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
debug!("remove_noop_landing_pads({:?})", body);
let def_id = body.source.def_id();
debug!(?def_id);
self.remove_nop_landing_pads(body)
}
}
@ -81,8 +82,6 @@ fn is_nop_landing_pad(
}
fn remove_nop_landing_pads(&self, body: &mut Body<'_>) {
debug!("body: {:#?}", body);
// Skip the pass if there are no blocks with a resume terminator.
let has_resume = body
.basic_blocks