[Docs] Try to clarify the concept of domains for noalias scope

Summary:
This tries to anchor down the concept of domains a bit better.  I had
trouble initially relating this to anything.  Also talking to David
Majnemer on IRC suggested that I wasn't the only one.

Reviewers: hfinkel

Subscribers: llvm-commits, majnemer

Differential Revision: http://reviews.llvm.org/D18799

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adam Nemet 2016-04-27 00:52:48 +00:00
parent 3b7741bb2b
commit 9f23dcdf45

View File

@ -4412,12 +4412,20 @@ instructions (loads, stores, memory-accessing calls, etc.) that carry
``noalias`` metadata can specifically be specified not to alias with some other
collection of memory access instructions that carry ``alias.scope`` metadata.
Each type of metadata specifies a list of scopes where each scope has an id and
a domain. When evaluating an aliasing query, if for some domain, the set
a domain.
When evaluating an aliasing query, if for some domain, the set
of scopes with that domain in one instruction's ``alias.scope`` list is a
subset of (or equal to) the set of scopes for that domain in another
instruction's ``noalias`` list, then the two memory accesses are assumed not to
alias.
Because scopes in one domain don't affect scopes in other domains, separate
domains can be used to compose multiple independent noalias sets. This is
used for example during inlining. As the noalias function parameters are
turned into noalias scope metadata, a new domain is used every time the
function is inlined.
The metadata identifying each domain is itself a list containing one or two
entries. The first entry is the name of the domain. Note that if the name is a
string then it can be combined across functions and translation units. A