summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/AliasSetTracker.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-25 00:48:42 +0000
committerDan Gohman <gohman@apple.com>2009-07-25 00:48:42 +0000
commit43d19d61d4ab124462152de2e0848ce4b2d8bdbe (patch)
tree8e538a4de4f5983ae947a898d140bc7debf7a117 /llvm/lib/Analysis/AliasSetTracker.cpp
parent67395e7c2c1c9ed95b147bd13ff25cf8b9983685 (diff)
downloadbcm5719-llvm-43d19d61d4ab124462152de2e0848ce4b2d8bdbe.tar.gz
bcm5719-llvm-43d19d61d4ab124462152de2e0848ce4b2d8bdbe.zip
Make AliasAnalysis and related classes use
getAnalysisIfAvailable<TargetData>(). llvm-svn: 77028
Diffstat (limited to 'llvm/lib/Analysis/AliasSetTracker.cpp')
-rw-r--r--llvm/lib/Analysis/AliasSetTracker.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index 801628ecd4f..841cd2be3b2 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -280,7 +280,7 @@ bool AliasSetTracker::add(Value *Ptr, unsigned Size) {
bool AliasSetTracker::add(LoadInst *LI) {
bool NewPtr;
AliasSet &AS = addPointer(LI->getOperand(0),
- AA.getTargetData().getTypeStoreSize(LI->getType()),
+ AA.getTypeStoreSize(LI->getType()),
AliasSet::Refs, NewPtr);
if (LI->isVolatile()) AS.setVolatile();
return NewPtr;
@@ -290,7 +290,7 @@ bool AliasSetTracker::add(StoreInst *SI) {
bool NewPtr;
Value *Val = SI->getOperand(0);
AliasSet &AS = addPointer(SI->getOperand(1),
- AA.getTargetData().getTypeStoreSize(Val->getType()),
+ AA.getTypeStoreSize(Val->getType()),
AliasSet::Mods, NewPtr);
if (SI->isVolatile()) AS.setVolatile();
return NewPtr;
@@ -412,7 +412,7 @@ bool AliasSetTracker::remove(Value *Ptr, unsigned Size) {
}
bool AliasSetTracker::remove(LoadInst *LI) {
- unsigned Size = AA.getTargetData().getTypeStoreSize(LI->getType());
+ unsigned Size = AA.getTypeStoreSize(LI->getType());
AliasSet *AS = findAliasSetForPointer(LI->getOperand(0), Size);
if (!AS) return false;
remove(*AS);
@@ -420,8 +420,7 @@ bool AliasSetTracker::remove(LoadInst *LI) {
}
bool AliasSetTracker::remove(StoreInst *SI) {
- unsigned Size =
- AA.getTargetData().getTypeStoreSize(SI->getOperand(0)->getType());
+ unsigned Size = AA.getTypeStoreSize(SI->getOperand(0)->getType());
AliasSet *AS = findAliasSetForPointer(SI->getOperand(1), Size);
if (!AS) return false;
remove(*AS);
OpenPOWER on IntegriCloud