aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit1e109621f1f9173df62958eca4260c809114bc3d (patch)
tree7bd0dacd185a34484255d18a6fe489c8388ba56c /docs/AliasAnalysis.html
parent8de3b1eb868fc5e9b6acb334ee487d943863f810 (diff)
downloadexternal_llvm-1e109621f1f9173df62958eca4260c809114bc3d.zip
external_llvm-1e109621f1f9173df62958eca4260c809114bc3d.tar.gz
external_llvm-1e109621f1f9173df62958eca4260c809114bc3d.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/AliasAnalysis.html')
-rw-r--r--docs/AliasAnalysis.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/AliasAnalysis.html b/docs/AliasAnalysis.html
index d1f911e..5e931d7 100644
--- a/docs/AliasAnalysis.html
+++ b/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