diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-12-14 21:08:48 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-12-14 21:08:48 +0000 |
commit | 01557ce1b165fada60195125dedd4f366be585ed (patch) | |
tree | 16bdfc50c33fc44ca42ee587070c92de5ffed937 /docs/AliasAnalysis.html | |
parent | cbe1d940313a0e7d75820f2c92a6c089fbc15f5a (diff) | |
download | external_llvm-01557ce1b165fada60195125dedd4f366be585ed.zip external_llvm-01557ce1b165fada60195125dedd4f366be585ed.tar.gz external_llvm-01557ce1b165fada60195125dedd4f366be585ed.tar.bz2 |
Clarify the meaning of the NoAlias response. The plan is to refer to this from
a future version of LangRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/AliasAnalysis.html')
-rw-r--r-- | docs/AliasAnalysis.html | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/docs/AliasAnalysis.html b/docs/AliasAnalysis.html index 1c4ca99..1569fb8 100644 --- a/docs/AliasAnalysis.html +++ b/docs/AliasAnalysis.html @@ -191,16 +191,20 @@ and returns MustAlias, MayAlias, or NoAlias as appropriate. </div> <div class="doc_text"> - -<p>An Alias Analysis implementation can return one of three responses: -MustAlias, MayAlias, and NoAlias. The No and May alias results are obvious: if -the two pointers can never equal each other, return NoAlias, if they might, -return MayAlias.</p> - -<p>The MustAlias response is trickier though. In LLVM, the Must Alias response -may only be returned if the two memory objects are guaranteed to always start at -exactly the same location. If two memory objects overlap, but do not start at -the same location, return MayAlias.</p> +<p>The NoAlias response is used when the two pointers refer to distinct objects, +even regardless of whether the pointers compare equal. For example, freed +pointers don't alias any pointers that were allocated afterwards. As a +degenerate case, pointers returned by malloc(0) have no bytes for an object, +and are considered NoAlias even when malloc returns the same pointer. The same +rule applies to NULL pointers.</p> + +<p>The MayAlias response is used whenever the two pointers might refer to the +same object. If the two memory objects overlap, but do not start at the same +location, return MayAlias.</p> + +<p>The MustAlias response may only be returned if the two memory objects are +guaranteed to always start at exactly the same location. A MustAlias response +implies that the pointers compare equal.</p> </div> |