summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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/Transforms
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/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp2
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index fa978ec9ab4..dc34cf0cc47 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -390,7 +390,7 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
// Don't hoist loads which have may-aliased stores in loop.
unsigned Size = 0;
if (LI->getType()->isSized())
- Size = AA->getTargetData().getTypeStoreSize(LI->getType());
+ Size = AA->getTypeStoreSize(LI->getType());
return !pointerInvalidatedByLoop(LI->getOperand(0), Size);
} else if (CallInst *CI = dyn_cast<CallInst>(&I)) {
// Handle obvious cases efficiently.
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 37988faeed5..5f6edcf336d 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -540,7 +540,7 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
unsigned AccessSize = 0;
if (AA) {
const Type *AccessTy = cast<PointerType>(Ptr->getType())->getElementType();
- AccessSize = AA->getTargetData().getTypeStoreSize(AccessTy);
+ AccessSize = AA->getTypeStoreSize(AccessTy);
}
while (ScanFrom != ScanBB->begin()) {
OpenPOWER on IntegriCloud