From b7da1cbd769a169d65ec2514916daef7a3f9f9f5 Mon Sep 17 00:00:00 2001 From: Jake Hughes Date: Mon, 11 Nov 2024 23:56:42 +0000 Subject: [PATCH] s/RemoveGcDrops/RemoveElidableDrops --- compiler/rustc_mir_transform/src/lib.rs | 4 ++-- .../src/{remove_gc_drops.rs => remove_elidable_drops.rs} | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename compiler/rustc_mir_transform/src/{remove_gc_drops.rs => remove_elidable_drops.rs} (89%) diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index e590a80b4410a..907c5033dfdae 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -95,7 +95,7 @@ mod nrvo; mod prettify; mod promote_consts; mod ref_prop; -mod remove_gc_drops; +mod remove_elidable_drops; mod remove_noop_landing_pads; mod remove_storage_markers; mod remove_uninit_drops; @@ -617,7 +617,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { &deduplicate_blocks::DeduplicateBlocks, &large_enums::EnumSizeOpt { discrepancy: 128 }, // Must come before CriticalCallEdges to prevent LLVM basic block ordering errors. - &remove_gc_drops::RemoveGcDrops, + &remove_elidable_drops::RemoveElidableDrops, // Some cleanup necessary at least for LLVM and potentially other codegen backends. &add_call_guards::CriticalCallEdges, // Cleanup for human readability, off by default. diff --git a/compiler/rustc_mir_transform/src/remove_gc_drops.rs b/compiler/rustc_mir_transform/src/remove_elidable_drops.rs similarity index 89% rename from compiler/rustc_mir_transform/src/remove_gc_drops.rs rename to compiler/rustc_mir_transform/src/remove_elidable_drops.rs index 2dacc12137f01..92c34d9c2c663 100644 --- a/compiler/rustc_mir_transform/src/remove_gc_drops.rs +++ b/compiler/rustc_mir_transform/src/remove_elidable_drops.rs @@ -4,11 +4,11 @@ use rustc_span::sym; use super::simplify::simplify_cfg; -pub struct RemoveGcDrops; +pub struct RemoveElidableDrops; -impl<'tcx> MirPass<'tcx> for RemoveGcDrops { +impl<'tcx> MirPass<'tcx> for RemoveElidableDrops { fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { - trace!("Running RemoveGcDrops on {:?}", body.source); + trace!("Running RemoveElidableDrops on {:?}", body.source); let is_gc_crate = tcx .get_diagnostic_item(sym::gc)