summaryrefslogtreecommitdiffstats
path: root/llvm/docs/AliasAnalysis.html
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-02 18:41:32 +0000
committerDan Gohman <gohman@apple.com>2010-07-02 18:41:32 +0000
commitdf12d08b8ecb222dc5e9f41cf8eba94d39a3ca44 (patch)
treeab295844f55d092b1f0881b5a726d24a30658320 /llvm/docs/AliasAnalysis.html
parentd2d60ce3882e0ff07e4027b59a0bf5097c8b9b63 (diff)
downloadbcm5719-llvm-df12d08b8ecb222dc5e9f41cf8eba94d39a3ca44.tar.gz
bcm5719-llvm-df12d08b8ecb222dc5e9f41cf8eba94d39a3ca44.zip
Reword the definition of the noalias attribute. The intention is for
the noalias argument on function attributes be usable to model the C99 restrict keyword on arguments, and to allow AliasAnalysis to consider a noalias-attributed argument to be an "identified object". To support this, refactor a new "based on" concept out of the current pointer aliasing "associated" concept. This "based on" concept is very similar to (though it is not identical with) the "based on" concept in C99. Also, reword the definition of NoAlias to more closely describe the concept that the optimizer uses. llvm-svn: 107495
Diffstat (limited to 'llvm/docs/AliasAnalysis.html')
-rw-r--r--llvm/docs/AliasAnalysis.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/docs/AliasAnalysis.html b/llvm/docs/AliasAnalysis.html
index d1f911e32dc..5e931d77a89 100644
--- a/llvm/docs/AliasAnalysis.html
+++ b/llvm/docs/AliasAnalysis.html
@@ -192,12 +192,14 @@ and returns MustAlias, MayAlias, or NoAlias as appropriate.
</div>
<div class="doc_text">
-<p>The NoAlias response is used when the two pointers refer to distinct objects,
-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 NoAlias response may be used when there is never an immediate dependence
+between any memory reference <i>based</i> on one pointer and any memory
+reference <i>based</i> the other. The most obvious example is when the two
+pointers point to non-overlapping memory ranges. Another is when the two
+pointers are only ever used for reading memory. Another is when the memory is
+freed and reallocated between accesses through one pointer and accesses through
+the other -- in this case, there is a dependence, but it's mediated by the free
+and reallocation.</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
OpenPOWER on IntegriCloud