Skip to content

[sil.rst] Just added some docs for begin_borrow, updated end_borrow syntax, adding more inline links. #36078

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
merged 2 commits into from
Feb 25, 2021

Conversation

gottesmm
Copy link
Contributor

Just some little fixes while waiting for a build to finish.

@gottesmm gottesmm requested review from meg-gupta and atrick February 22, 2021 00:43
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test linux platform

modified. This means that:
Ends the scope for which the `Guaranteed`_ ownership possessing SILValue ``%1``
is borrowed from the SILValue ``%0``. Must be paired with at most 1 borrowing
instruction (like `load_borrow`_, `begin_borrow`_) along any path through the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "pairing" terminology is mysterious. I only know what it means because I already know how it works.

Seems more straightforward to simply specify that the operand value always begins the borrow scope, then list those, including guaranteed phis (block arguments provided by branch instructions--when specifying OSSA it's much better to talk about phis since they have nothing interesting in common with other block arguments).

After that, you can say that guaranteed phi operands have the same property. So, as a consequence, all acyclic paths through the program that reach this end_borrow first reach exactly one load_borrow or begin_borrow associated with this end_borrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will add more text in a follow on commit.

@gottesmm gottesmm merged commit c1a9f6f into swiftlang:main Feb 25, 2021
@gottesmm gottesmm deleted the silrst-improvements branch February 25, 2021 00:05
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