mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
It removes a `copy_value` where the source is a guaranteed value, if possible: ``` %1 = copy_value %0 // %0 = a guaranteed value // uses of %1 destroy_value %1 // borrow scope of %0 is still valid here ``` -> ``` // uses of %0 ``` This optimization is very similar to the LoadCopyToBorrow optimization. Therefore I merged both optimizations into a single file and renamed it to "CopyToBorrowOptimization".