Skip to content

[5.5] SILModule: track opened archetypes per function. #37041

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

eeckstein
Copy link
Contributor

In theory we could map opened archetypes per module because opened archetypes should be unique across the module.
But currently in some rare cases SILGen re-uses the same opened archetype in multiple functions.
The fix is to add the SILFunction to the map's key.
That also requires that we update the map whenever instructions are moved from one function to another.

This fixes a compiler crash.

rdar://76916931

In theory we could map opened archetypes per module because opened archetypes _should_ be unique across the module.
But currently in some rare cases SILGen re-uses the same opened archetype in multiple functions.
The fix is to add the SILFunction to the map's key.
That also requires that we update the map whenever instructions are moved from one function to another.

This fixes a compiler crash.

rdar://76916931
@eeckstein eeckstein requested a review from slavapestov April 23, 2021 16:56
@eeckstein eeckstein added the r5.5 label Apr 23, 2021
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit f78fe71 into swiftlang:release/5.5 Apr 28, 2021
@eeckstein eeckstein deleted the fix-open-archetype-mapping-5.5 branch April 28, 2021 08:04
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants