Open ec8ba57e-8db4-4a5b-97d9-d3e186c86593 opened 7 years ago
@swift-ci create
The optimizer makes assumptions about layout equivalence. See canUnsafeCastStruct/Tuple/Enum. This code should be centralized in an ABI spec (see SR-3730). But we also need to make sure this code honors resilience boundaries. Currently it just runs over the list of stored properties on the type.
After reviewing this, we have decided not to tackle changes for this in Swift 5. We'll lose some optimization opportunities for fragile generic structs that are published with the old algorithm, but we can still adjust the algorithm for future compiler versions.
By the way, we're tracking any changes to the optimizer's assumptions about layout in rdar://problem/34395744 (to address Andy's comment above).
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Task, AffectsABI | |Assignee | None | |Priority | Medium | md5: a21fe6ef95bd4b08859b864fa7a24dc9Issue Description:
This bug is tracking investigating how to most efficiently lay out partially-opaque aggregates before ABI Stability is achieved.