diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-26 05:50:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-26 05:50:23 +0000 |
commit | 61d462760b6c684465f7353b87687e904145be88 (patch) | |
tree | b4ec83a5ecc0c07b8aacf7db5db4639d48299d84 | |
parent | 558cb5f4a131be8de67dd66d06f5c053cbf7403e (diff) | |
download | external_llvm-61d462760b6c684465f7353b87687e904145be88.zip external_llvm-61d462760b6c684465f7353b87687e904145be88.tar.gz external_llvm-61d462760b6c684465f7353b87687e904145be88.tar.bz2 |
Add some new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15230 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/AliasSetTracker.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp index f11159e..867e58a 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/lib/Analysis/AliasSetTracker.cpp @@ -215,6 +215,13 @@ AliasSet &AliasSetTracker::getAliasSetForPointer(Value *Pointer, unsigned Size, } } +bool AliasSetTracker::add(Value *Ptr, unsigned Size) { + bool NewPtr; + addPointer(Ptr, Size, AliasSet::NoModRef, NewPtr); + return NewPtr; +} + + bool AliasSetTracker::add(LoadInst *LI) { bool NewPtr; AliasSet &AS = addPointer(LI->getOperand(0), @@ -319,6 +326,12 @@ void AliasSetTracker::remove(AliasSet &AS) { } while (!SetDead); } +bool AliasSetTracker::remove(Value *Ptr, unsigned Size) { + AliasSet *AS = findAliasSetForPointer(Ptr, Size); + if (!AS) return false; + remove(*AS); + return true; +} bool AliasSetTracker::remove(LoadInst *LI) { unsigned Size = AA.getTargetData().getTypeSize(LI->getType()); |