[CanonicalizeBorrowScope] Look through moves.

When encountering inside a borrow scope a non-lexical move_value or a
move_value [lexical] where the borrowed value is itself already lexical,
delete the move_value and regard its uses as uses of the moved-from
value.
This commit is contained in:
Nate Chandler
2023-01-18 17:24:30 -08:00
parent 11b76da7fa
commit 10e86d6653
5 changed files with 117 additions and 24 deletions

View File

@@ -109,7 +109,7 @@
namespace swift {
extern llvm::Statistic NumCopiesEliminated;
extern llvm::Statistic NumCopiesAndMovesEliminated;
extern llvm::Statistic NumCopiesGenerated;
/// Insert a copy on this operand. Trace and update stats.