From 6c19261456c5946bcc56531949e3833178211656 Mon Sep 17 00:00:00 2001 From: miguelraz Date: Fri, 21 Apr 2023 15:51:22 -0600 Subject: [PATCH] add note about `remove_duplicate_unreachable_blocks` not having better perf with `SmallVec`s --- compiler/rustc_mir_transform/src/simplify.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_mir_transform/src/simplify.rs b/compiler/rustc_mir_transform/src/simplify.rs index e1ca7c107b9d2..421d1b534b65d 100644 --- a/compiler/rustc_mir_transform/src/simplify.rs +++ b/compiler/rustc_mir_transform/src/simplify.rs @@ -290,6 +290,8 @@ pub fn combine_duplicate_switch_targets(terminator: &mut Terminator<'_>) { } } +// Note: Trying to Turn `duplicates` into a `SmallVec` for performance did not bear fruit, see +// https://github.com/rust-lang/rust/pull/110524 pub fn remove_duplicate_unreachable_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { struct OptApplier<'tcx> { tcx: TyCtxt<'tcx>,