Skip to content

[SIL Opaque Value] Support checked_cast_br in Address Lowering with loadable source & opaque target type #58441

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
merged 1 commit into from
May 5, 2022

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Apr 27, 2022

Rewrite checked_cast_br instructions that have a loadable source and opaque target as a post pass. Such instructions are not visited by the UseRewriter. All the uses of the opaque block argument are replaced by the storageAddress assigned during the initial allocation. At the end of AddressLowering such checked_cast_br instructions are rewritten to their address forms using this storage address.

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta meg-gupta requested a review from atrick April 27, 2022 05:50
@meg-gupta meg-gupta force-pushed the ccbedgecase branch 4 times, most recently from b4f7ce7 to 72ffba9 Compare May 4, 2022 06:37
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

Wow, I just skimmed through the cleanup, but it looks great to me. Maybe there are some other places that will need to be cleaned up too.

@meg-gupta meg-gupta merged commit 60d0ac6 into swiftlang:main May 5, 2022
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.

2 participants