Explicit performance concern.
This commit is contained in:
parent
38612f5ec7
commit
0bd9bd6b8a
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue