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
This commit is contained in:
Dan Gohman
2010-08-03 01:03:11 +00:00
parent 847a84efd2
commit ef1cfac9e5
3 changed files with 16 additions and 10 deletions

View File

@ -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