mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* Replace address casts of heap objects ``` %1 = unchecked_addr_cast %0 : $*SomeClass to $*OtherClass %2 = load [copy] %1 ``` with ref-casts of the loaded value ``` %1 = load [copy] %0 %2 = unchecked_ref_cast %1 : $SomeClass to $OtherClass ``` * Replace a `load_borrow` of a `store_borrow` with a `begin_borrow`: ``` %1 = alloc_stack $T %2 = store_borrow %0 to %1 ... %3 = load_borrow %2 // ... uses of %3 end_borrow %3 ``` -> ``` %1 = alloc_stack $T %2 = store_borrow %0 to %1 ... %3 = begin_borrow %0 // ... uses of %3 end_borrow %3 ```
15 KiB
15 KiB