-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[OpaqueValues] Handled more instructions. #61924
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
[OpaqueValues] Handled more instructions. #61924
Conversation
Now that it can be called on partial_apply instructions, insertAfterFullEvaluation does not name what the function does. One could imagine a function which inserted after the applies of (non-escaping) partial_applies.
7fef0c4
to
912855d
Compare
@swift-ci please test |
912855d
to
8b8e916
Compare
@swift-ci please smoke test |
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.
LGTM
...except no need to call forceDeleteWithUsers after replaceAllUsesWith
auto *load = builder.createLoad(cvi->getLoc(), destAddr, | ||
LoadOwnershipQualifier::Copy); | ||
cvi->replaceAllUsesWith(load); | ||
pass.deleter.forceDelete(cvi); |
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.
what about the non-copy use case?
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.
Actually, visitUncheckedBitwiseCastInst
isn't fully handled yet
When casting via unchecked_bitwise_cast, if the destination type is loadable, don't mark the value it produces rewritten--that value is not one that AddressLowering is tracking. Instead, replace its copy_value uses with load [copy] uses of the address the rewritten instruction produces.
The handling is the same as for value_metatype.
8b8e916
to
57352d7
Compare
@swift-ci please test |
Based on #61897 , #61917 .