mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The optimization replaces a `load [copy]` with a `load_borrow` if possible. ``` %1 = load [copy] %0 // no writes to %0 destroy_value %1 ``` -> ``` %1 = load_borrow %0 // no writes to %0 end_borrow %1 ``` The new implementation uses alias-analysis (instead of a simple def-use walk), which is much more powerful. rdar://115315849