-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add new cast pattern in SILCombine #31595
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question, from what I can see you only added a test for one way, unless I am reading incorrectly. Can you add another test with the other direction?
@swift-ci test |
@swift-ci test |
Build failed |
Build failed |
@meg-gupta can you make sure to squash this before you land it/give it a nice commit message. The commit history is the narrative that we leave for our future selves! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding both versions of the tests! = ). This commit is starting to look really beautiful! I have a few more small things below though on the FileCheck lines that will make your tests more robust in the face of future changes!
I'll update the FileCheck changes. And will squash merge. |
@swift-ci test |
Build failed |
Build failed |
@swift-ci test |
…atype conversions Add pattern to catch the following redundant conversion: %tmp1 = thick_to_objc_metatype %x %tmp2 = objc_to_thick_metatype %tmp1 ... %tmp3 = <sil operation> %tmp2 to: %tmp3 = <sil operation> %x Similarly add pattern for redundant conversion of objc_to_thick_metatype followed by thick_to_objc_metatype. Fixes rdar://62932799
@swift-ci smoke test and merge |
@swift-ci smoke test |
Add new pattern in SILCombine to optimize redundant thick to objc metatype conversions Add pattern to catch the following redundant conversion: %tmp1 = thick_to_objc_metatype %x %tmp2 = objc_to_thick_metatype %tmp1 ... %tmp3 = <sil operation> %tmp2 to: %tmp3 = <sil operation> %x Similarly add pattern for redundant conversion of objc_to_thick_metatype followed by thick_to_objc_metatype. Fixes rdar://62932799
Add new pattern in SILCombine to optimize redundant thick to objc metatype conversions Add pattern to catch the following redundant conversion: %tmp1 = thick_to_objc_metatype %x %tmp2 = objc_to_thick_metatype %tmp1 ... %tmp3 = <sil operation> %tmp2 to: %tmp3 = <sil operation> %x Similarly add pattern for redundant conversion of objc_to_thick_metatype followed by thick_to_objc_metatype. Fixes rdar://62932799
Add pattern to catch the following redundant conversion:
%tmp1 = thick_to_objc_metatype %x
%tmp2 = objc_to_thick_metatype %tmp1
...
%tmp3 = <sil operation> %tmp2
to:
%tmp3 = <sil operation> %x
Similarly add pattern for redundant conversion of
objc_to_thick_metatype
followed by
thick_to_objc_metatype
.Fixes rdar://62932799