aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/AliasAnalysis.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-11 17:33:39 +0000
committerDan Gohman <gohman@apple.com>2010-11-11 17:33:39 +0000
commit8e78cc4e130a8773cc8a2be2a94c4a97317ac383 (patch)
treed230c3e1ba3a9443ba66cb62b0fb82f774230d1b /include/llvm/Analysis/AliasAnalysis.h
parent9302bd664d930e7e6b61e208b0cca06fe71e8eb3 (diff)
downloadexternal_llvm-8e78cc4e130a8773cc8a2be2a94c4a97317ac383.zip
external_llvm-8e78cc4e130a8773cc8a2be2a94c4a97317ac383.tar.gz
external_llvm-8e78cc4e130a8773cc8a2be2a94c4a97317ac383.tar.bz2
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/AliasAnalysis.h')
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index 12840b3..f363f42 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -16,11 +16,21 @@
// which automatically provides functionality for the entire suite of client
// APIs.
//
-// This API represents memory as a (Pointer, Size) pair. The Pointer component
-// specifies the base memory address of the region, the Size specifies how large
-// of an area is being queried, or UnknownSize if the size is not known.
-// Pointers that point to two completely different objects in memory never
-// alias, regardless of the value of the Size component.
+// This API identifies memory regions with the Location class. The pointer
+// component specifies the base memory address of the region. The Size specifies
+// the maximum size (in address units) of the memory region, or UnknownSize if
+// the size is not known. The TBAA tag identifies the "type" of the memory
+// reference; see the TypeBasedAliasAnalysis class for details.
+//
+// Some non-obvious details include:
+// - Pointers that point to two completely different objects in memory never
+// alias, regardless of the value of the Size component.
+// - NoAlias doesn't imply inequal pointers. The most obvious example of this
+// is two pointers to constant memory. Even if they are equal, constant
+// memory is never stored to, so there will never be any dependencies.
+// In this and other situations, the pointers may be both NoAlias and
+// MustAlias at the same time. The current API can only return one result,
+// though this is rarely a problem in practice.
//
//===----------------------------------------------------------------------===//