Skip to content

[AddressLowering] Set the right yield operand. #61925

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

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Nov 4, 2022

Rather than always setting the 0th operand of a yield instruction, set the operand at the index of the original operand.

Based off #61924

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.
@nate-chandler nate-chandler changed the title [AddressLowering] Handle select_enum. [AddressLowering] Set the right yield operand. Nov 4, 2022
@nate-chandler
Copy link
Contributor Author

@swift-ci please 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.

huh... right on

@nate-chandler
Copy link
Contributor Author

@swift-ci please test macOS platform

@nate-chandler nate-chandler force-pushed the opaque-values/3/20221103 branch from 61c97cc to 2af31c7 Compare November 4, 2022 17:22
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.
Rather than always setting the 0th operand of a yield instruction, set
the operand at the index of the original operand.
@nate-chandler nate-chandler force-pushed the opaque-values/3/20221103 branch from 2af31c7 to dec657f Compare November 4, 2022 17:48
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review November 4, 2022 20:46
@nate-chandler nate-chandler merged commit 31ab259 into swiftlang:main Nov 4, 2022
@nate-chandler nate-chandler deleted the opaque-values/3/20221103 branch November 4, 2022 23:15
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