Skip to content

[docs] Clarify SIL level TBAA rules. #2147

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 1 commit into from
Aug 7, 2016
Merged

[docs] Clarify SIL level TBAA rules. #2147

merged 1 commit into from
Aug 7, 2016

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Apr 11, 2016

This was reviewed a while back by @jckarter. I'm just getting around to cleaning up the docs.

@gottesmm
Copy link
Contributor

I took a quick look. LGTM.

non-class-instance heap objects.
* Two values of the same class type ``$C`` may alias. Two values of
related class type ``$B`` and ``$D``, where there is a subclass
relationship between ``$B`` and ``$D``, may alias. Two values of of
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: 'of of'

@atrick
Copy link
Contributor Author

atrick commented Apr 12, 2016

The previous version of this pull request was a little muddled (I had copied it in from an old document, and upon rereading I don't think it was clarifying much). I rewrote the language last night to reflect my current understanding. Hopefully it's clear now. Please review.

@CodaFi
Copy link
Contributor

CodaFi commented Aug 6, 2016

@atrick Are these changes still relevant?

@atrick
Copy link
Contributor Author

atrick commented Aug 6, 2016

This can finally be updated now that we have a formal notion of binding memory to a type. I just need a little more time to rewrite the language accordingly.

This documentation now reflects the optimizer's reality.

I'm still working on formalizing language level rules for strict aliasing. Those
will be introduced in a separate doc file.

There some language about alias-introducing operations. This concept existed in
the old documentation but was never really implemented. This all makes sense now
that we have a formal model for binding memory to a type along with specific variants
of pointer_to_address that either enforce strict aliasing or permit type punning.

The detailed explanation of TBAA should probably be moved into a separate
optimizer document, but there isn't a good place for it yet.
@atrick
Copy link
Contributor Author

atrick commented Aug 7, 2016

I'm resurrecting this old documentation PR now that practice is catching up with theory.

@atrick atrick merged commit 5cc6799 into swiftlang:master Aug 7, 2016
phausler pushed a commit to phausler/swift that referenced this pull request Aug 8, 2016
This documentation now reflects the optimizer's reality.

I'm still working on formalizing language level rules for strict aliasing. Those
will be introduced in a separate doc file.

There some language about alias-introducing operations. This concept existed in
the old documentation but was never really implemented. This all makes sense now
that we have a formal model for binding memory to a type along with specific variants
of pointer_to_address that either enforce strict aliasing or permit type punning.

The detailed explanation of TBAA should probably be moved into a separate
optimizer document, but there isn't a good place for it yet.
@atrick atrick deleted the sil-tbaa-docs branch July 7, 2017 00:22
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.

4 participants