Explicit performance concern.

This commit is contained in:
Camille GILLOT 2023-04-26 18:42:41 +00:00
parent 38612f5ec7
commit 0bd9bd6b8a

View file

@ -131,8 +131,8 @@ fn compute_replacement<'tcx>(
let maybe_dead = maybe_dead.contains(target.local);
if target.projection.first() == Some(&PlaceElem::Deref) {
// We are creating a reborrow. As `place.local` is a reference, removing the
// `StorageDead` is fine.
// We are creating a reborrow. As `place.local` is a reference, removing the storage
// statements should not make it much harder for LLVM to optimize.
if maybe_dead {
storage_to_remove.insert(target.local);
}