Skip to content

Add silcombines for destructure_tuple and destructure_struct #71880

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
Feb 26, 2024

Conversation

meg-gupta
Copy link
Contributor

No description provided.

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci test windows platform

@eeckstein
Copy link
Contributor

We already have this simplifications in SwiftCompilerSources: https://github.com/apple/swift/blob/main/SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyDestructure.swift

To let it run in the SILCombiner, just let it conform to SILCombineSimplifyable and add a SWIFT_SILCOMBINE_PASS in Passes.def.

In general, we should implement new SILCombine simplifications in swift rather than in C++.

@meg-gupta
Copy link
Contributor Author

@eeckstein I updated the PR to use existing versions. Thanks

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

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, thanks

@meg-gupta meg-gupta enabled auto-merge February 26, 2024 19:03
@meg-gupta meg-gupta merged commit 4fe0429 into swiftlang:main Feb 26, 2024
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