Skip to content

[sil-combine] Fix optimization of COWBufferRead for ownership #35721

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

@gottesmm gottesmm commented Feb 2, 2021

Got to use the interior pointer functionality to simplify the algorithm/make it safer.

… IntPtrOperand as a value, not a const ref.

1. The reason to do this is that an InteriorPointerOperand is a value type.
2. Sometimes one wants to be able to use the IntPtrOperand that is not a const &
   and the value type formulation always works.

Functionality wise, this is NFCI.
I was able to use the interior pointer operand API to great effect here.
@gottesmm
Copy link
Contributor Author

gottesmm commented Feb 2, 2021

@swift-ci smoke test

@gottesmm gottesmm merged commit 95662b0 into swiftlang:main Feb 3, 2021
@gottesmm gottesmm deleted the pr-4d794a36822362fa51f2d2bad655b867394042e4 branch February 3, 2021 02:51
@eeckstein
Copy link
Contributor

@gottesmm post-commit review: Please also check in your tests that the builtin can be removed completely.
That's the point of the builtin. In general, it should be removed completely.

@gottesmm
Copy link
Contributor Author

gottesmm commented Feb 3, 2021

Ok. I will fix. Thanks.

@gottesmm
Copy link
Contributor Author

gottesmm commented Feb 3, 2021

@eeckstein #35745

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