Skip to content
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

Fix InlineArray and some other corner cases in Swift lowering #99337

Merged
merged 5 commits into from
Mar 8, 2024

Conversation

jkoritzinsky
Copy link
Member

Fix the case mentioned in #99294 (comment)

Fixes InlineArray support

…sure we have correct inlinearray support and fix unaligned lowering calculations
@ghost ghost assigned jkoritzinsky Mar 6, 2024
@jkoritzinsky jkoritzinsky changed the title Use TypeWithRepeatedFields in the FieldLayoutIntervalCalculator to ensure we have correct inlinearray support and fix unaligned lowering calculations Fix InlineArray and some other corner cases in Swift lowering Mar 6, 2024
jakobbotsch
jakobbotsch previously approved these changes Mar 6, 2024
The following algorithm changes were made:

- Don't merge an Opaque interval and and Empty interval during construction.
- Introduce a post-processing phase that removes Empty intervals and merges Opaque intervals
  that used to have Empty intervals between them, as long as the opaque intervals are within the
  same pointer-size block.
- Use the opaque interval's offset and size when breaking it up.
- Allow the opaque splitting to split up higher sizes if the lower sizes have improved the alignment.
@jakobbotsch
Copy link
Member

Do we want to check in all the tests, or should we reduce them to a smaller set once everything is passing (perhaps making sure we include the specific cases that were investigated)? I wasn't planning on checking all my tests in in #99294 since it seems like a lot of source code to commit.

@jkoritzinsky
Copy link
Member Author

Yeah I'm going to go back and slim down the test list to have a few representative samples of the failures.

Update tests that need to specify non-natural offsets to specify them.
Reduce Swift test suite to a representative sample of the various cases that have captured failures.
@jkoritzinsky jkoritzinsky merged commit 3b8d8da into dotnet:main Mar 8, 2024
110 checks passed
@jkoritzinsky jkoritzinsky deleted the swift-lowering-2 branch March 8, 2024 01:37
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants