diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-26 21:36:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-26 21:36:25 +0000 |
commit | 07bfa52405feb99155304c1a28b71e69d046589c (patch) | |
tree | c8773279e7403fb784cc78b5b00f08edc7874dca /lib/Analysis/AliasSetTracker.cpp | |
parent | f3e1d6977ee5fb6b66df314d65e28e2c35d6e244 (diff) |
Add a new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/AliasSetTracker.cpp')
-rw-r--r-- | lib/Analysis/AliasSetTracker.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp index 2da144c35f..b351874e88 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/lib/Analysis/AliasSetTracker.cpp @@ -189,6 +189,18 @@ AliasSet *AliasSetTracker::findAliasSetForPointer(const Value *Ptr, return FoundSet; } +/// containsPointer - Return true if the specified location is represented by +/// this alias set, false otherwise. This does not modify the AST object or +/// alias sets. +bool AliasSetTracker::containsPointer(Value *Ptr, unsigned Size) const { + for (const_iterator I = begin(), E = end(); I != E; ++I) + if (!I->Forward && I->aliasesPointer(Ptr, Size, AA)) + return true; + return false; +} + + + AliasSet *AliasSetTracker::findAliasSetForCallSite(CallSite CS) { AliasSet *FoundSet = 0; for (iterator I = begin(), E = end(); I != E; ++I) |