Skip to content

add note about remove_duplicate_unreachable_blocks in source comments #110658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_mir_transform/src/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +293 to +294
Copy link
Member

@compiler-errors compiler-errors Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if we do want to leave a note about perf sensitivity here, it should probably left as a comment on the field instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

pub fn remove_duplicate_unreachable_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
struct OptApplier<'tcx> {
tcx: TyCtxt<'tcx>,
Expand Down