aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-03 01:03:11 +0000
committerDan Gohman <gohman@apple.com>2010-08-03 01:03:11 +0000
commitef1cfac9e50def9097cd3e3ab3c5cad7f4c758cc (patch)
treea325ebdd4287c7436ad9a41faddda9f65d411b91 /include/llvm/Analysis
parent847a84efd23a2c7d90429b82f6e0f19d1f913d9a (diff)
downloadexternal_llvm-ef1cfac9e50def9097cd3e3ab3c5cad7f4c758cc.zip
external_llvm-ef1cfac9e50def9097cd3e3ab3c5cad7f4c758cc.tar.gz
external_llvm-ef1cfac9e50def9097cd3e3ab3c5cad7f4c758cc.tar.bz2
Introduce a symbolic constant for ~0u for use with AliasAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index e0068dc..ef3a38a 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -64,6 +64,11 @@ public:
AliasAnalysis() : TD(0), AA(0) {}
virtual ~AliasAnalysis(); // We want to be subclassed
+ /// UnknownSize - This is a special value which can be used with the
+ /// size arguments in alias queries to indicate that the caller does not
+ /// know the sizes of the potential memory references.
+ static unsigned const UnknownSize = ~0u;
+
/// getTargetData - Return a pointer to the current TargetData object, or
/// null if no TargetData object is available.
///
@@ -96,7 +101,7 @@ public:
/// alias - A convenience wrapper for the case where the sizes are unknown.
AliasResult alias(const Value *V1, const Value *V2) {
- return alias(V1, ~0u, V2, ~0u);
+ return alias(V1, UnknownSize, V2, UnknownSize);
}
/// isNoAlias - A trivial helper function to check to see if the specified