Skip to content

More resilience expansion plumbing for type lowering #23126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Mar 6, 2019

As promised in #23110, I've started fixing the call sites annotated with // FIXME: Expansion. This uncovered some more type lowering bugs and missing APIs.

rdar://problem/24057844, https://bugs.swift.org/browse/SR-261.

@slavapestov slavapestov requested a review from eeckstein March 6, 2019 07:05
…pansions

When calling getTypeLowering() for the first time with a new type that did not
appear in the cache under _any_ resilience expansion, we would incorrectly take
the unlowered type and treat it as a lowered type, incorrectly skipping the
computeLoweredRValueType() call.
We were calling isResilent() to check if a type's layout contained a
type that was resilient in some resilience domain. This was used to
determine if we should re-lower the type when the desired resilience
expansion does not match the given resilence expansion.

However this bit was only getting set on address only types. This
means if a resilient type was lowered with maximal expansion first,
and this produced a non-address only type lowering, we would not
lower it again when minimal expansion was requested.

This can't be triggered with the existing tests, but upcoming changes
result in regressions from this.
@slavapestov slavapestov force-pushed the begin-removing-fixme-expansions branch 2 times, most recently from 3a2d24d to 268f780 Compare March 6, 2019 08:22
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Mar 6, 2019

Build failed
Swift Test Linux Platform
Git Sha - 3a2d24d62dd8628ac5302d0cf2ea5adef7fe5c1b

@swift-ci
Copy link
Contributor

swift-ci commented Mar 6, 2019

Build failed
Swift Test OS X Platform
Git Sha - 3a2d24d62dd8628ac5302d0cf2ea5adef7fe5c1b

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 7081293 into swiftlang:master Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants