Skip to content

Commit

Permalink
Merge pull request #145 from jacob-hughes/rename_gc_drops
Browse files Browse the repository at this point in the history
s/RemoveGcDrops/RemoveElidableDrops
  • Loading branch information
ltratt authored Nov 12, 2024
2 parents 15a8096 + b7da1cb commit e20ce32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e20ce32

Please sign in to comment.