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);
|
let maybe_dead = maybe_dead.contains(target.local);
|
||||||
|
|
||||||
if target.projection.first() == Some(&PlaceElem::Deref) {
|
if target.projection.first() == Some(&PlaceElem::Deref) {
|
||||||
// We are creating a reborrow. As `place.local` is a reference, removing the
|
// We are creating a reborrow. As `place.local` is a reference, removing the storage
|
||||||
// `StorageDead` is fine.
|
// statements should not make it much harder for LLVM to optimize.
|
||||||
if maybe_dead {
|
if maybe_dead {
|
||||||
storage_to_remove.insert(target.local);
|
storage_to_remove.insert(target.local);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue