forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[silgen] When compiling with sil-ownership use borrows+CopyOnSuccess …
…instead of TakeOnSuccess. This is NFC since all changes are behind a flag. I took a look at the codegen when this is enabled. It looks pretty optimizable for a -Onone ARC pass. Until I have that pass though I need this behind a flag. Basically you see a lot of this pattern: %0 = begin_borrow %foo %1 = copy_value %0 ... bb1: %2 = begin_borrow %1 %3 = copy_value %2 ... destroy_value %3 end_borrow %2 from %1 destroy_value %1 end_borrow %0 from %foo ... bb2: destroy_value %1 end_borrow %0 from %foo ... This is really easy to optimize since one can easily see that all of %1's users are borrows or a final destroy. rdar://31145255
- Loading branch information
Showing
1 changed file
with
66 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters