[swift-dev] [arc optimization] Why doesn't enum destructuring use guaranteed references?

Michael Gottesman mgottesman at apple.com
Tue Jan 2 20:00:36 CST 2018

> On Jan 2, 2018, at 7:00 PM, Joe Groff <jgroff at apple.com> wrote:
>> On Dec 30, 2017, at 11:23 AM, Michael Gottesman via swift-dev <swift-dev at swift.org> wrote:
>> No. A parameter's convention is ABI. You don't want to change ABI related things like that via escape analysis since it means that as a function changes, due to the optimizer, the ABI can change =><=. *BUT* recently Adam Nemet has added support for LLVM's opt remark infrastructure to Swift. Something like that /could/ provide suggestions when it is run that this might be a profitable parameter to change from +0 to +1 or vis-a-versa. Then the user could make that change via annotation. Keep in mind that this would most likely be an ABI breaking change.
> ABI only matters at public entry points for ABI-stable binaries. We can do this sort of analysis freely within modules, or in a hypothetical multi-module-optimization mode.

Sure. We were talking in the general case though which does include public entry points of ABI-stable binaries. So my statement was correct.


> -Joe

More information about the swift-dev mailing list