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

Joe Groff jgroff at apple.com
Tue Jan 2 18:00:50 CST 2018

> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20180102/a35463ac/attachment.html>

More information about the swift-dev mailing list