summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MemDepPrinter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-11 21:50:19 +0000
committerDan Gohman <gohman@apple.com>2010-11-11 21:50:19 +0000
commit65316d674914067bd0b6da080f8a7cf7c1aa0e78 (patch)
treedbbe995413eaf4a98c9a91bcda9189180b33266a /llvm/lib/Analysis/MemDepPrinter.cpp
parentbf65066a37ed3254b1a738e85af59057a1c688c5 (diff)
downloadbcm5719-llvm-65316d674914067bd0b6da080f8a7cf7c1aa0e78.tar.gz
bcm5719-llvm-65316d674914067bd0b6da080f8a7cf7c1aa0e78.zip
Add helper functions for computing the Location of load, store,
and vaarg instructions. llvm-svn: 118845
Diffstat (limited to 'llvm/lib/Analysis/MemDepPrinter.cpp')
-rw-r--r--llvm/lib/Analysis/MemDepPrinter.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/MemDepPrinter.cpp b/llvm/lib/Analysis/MemDepPrinter.cpp
index 90a7c576f07..64d215c37cc 100644
--- a/llvm/lib/Analysis/MemDepPrinter.cpp
+++ b/llvm/lib/Analysis/MemDepPrinter.cpp
@@ -102,22 +102,15 @@ bool MemDepPrinter::runOnFunction(Function &F) {
SmallVector<NonLocalDepResult, 4> NLDI;
if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
// FIXME: Volatile is not handled properly here.
- AliasAnalysis::Location Loc(LI->getPointerOperand(),
- AA.getTypeStoreSize(LI->getType()),
- LI->getMetadata(LLVMContext::MD_tbaa));
+ AliasAnalysis::Location Loc = AA.getLocation(LI);
MDA.getNonLocalPointerDependency(Loc, !LI->isVolatile(),
LI->getParent(), NLDI);
} else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
// FIXME: Volatile is not handled properly here.
- AliasAnalysis::Location Loc(SI->getPointerOperand(),
- AA.getTypeStoreSize(SI->getValueOperand()
- ->getType()),
- SI->getMetadata(LLVMContext::MD_tbaa));
+ AliasAnalysis::Location Loc = AA.getLocation(SI);
MDA.getNonLocalPointerDependency(Loc, false, SI->getParent(), NLDI);
} else if (VAArgInst *VI = dyn_cast<VAArgInst>(Inst)) {
- AliasAnalysis::Location Loc(SI->getPointerOperand(),
- AliasAnalysis::UnknownSize,
- SI->getMetadata(LLVMContext::MD_tbaa));
+ AliasAnalysis::Location Loc = AA.getLocation(VI);
MDA.getNonLocalPointerDependency(Loc, false, VI->getParent(), NLDI);
} else {
llvm_unreachable("Unknown memory instruction!");
OpenPOWER on IntegriCloud