Skip to content

[semantic-arc] Change emitCopyValue entrypoints to return the copied SILValue. #5444

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

gottesmm
Copy link
Contributor

[semantic-arc] Change emitCopyValue entrypoints to return the copied SILValue.

I have not updated any APIs that use the emitCopyValue entrypoints to properly
propagate forward the returned value.

The strategy for reforming the resulting value was to:

  1. Return the retain_value operand in leaf cases.
  2. In aggregate cases, just use reformAggregate to reform the aggregate from the
    copied leaf results.
  3. In enums, since I deleted the deep code, this is the same as the leaf cases.

Once I change in a subsequent commit the actual retain_value emission to instead
be copy_value emission, then type lowering will be able to properly pair
copy_value operations.

rdar://28851920

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

…SILValue.

I have not updated any APIs that use the emitCopyValue entrypoints to properly
propagate forward the returned value.

The strategy for reforming the resulting value was to:

1. Return the retain_value operand in leaf cases.
2. In aggregate cases, just use reformAggregate to reform the aggregate from the
   copied leaf results.
3. In enums, since I deleted the deep code, this is the same as the leaf cases.

Once I change in a subsequent commit the actual retain_value emission to instead
be copy_value emission, then type lowering will be able to properly pair
copy_value operations.

rdar://28851920
@gottesmm gottesmm force-pushed the return_copyvalue_result_from_typelowering branch from 0e8458e to 7f2ec61 Compare October 25, 2016 16:27
@gottesmm
Copy link
Contributor Author

Lets try this again... The test failed b/c before we were not reforming the aggregate and the test that broke used a ton of CHECK-NEXTs that were unnecessary. I changed them to just CHECK so that the interleaving instructions that reconstructed the aggregates are ignored.

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

1 similar comment
@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 0569fed into swiftlang:master Oct 25, 2016
@gottesmm gottesmm deleted the return_copyvalue_result_from_typelowering branch October 25, 2016 17:16
MaxDesiatov pushed a commit that referenced this pull request Sep 7, 2023
[pull] swiftwasm from main
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