summaryrefslogtreecommitdiff
path: root/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
commit6d8eb156e6be727570b300bac7712f745a318c7d (patch)
treecd4250cc4395e8077f2dac80017fbe44ae96a94b /lib/Analysis/MemDepPrinter.cpp
parentef5b390263ebe6e22c89cb16faebf0fb3c4ce1ee (diff)
downloadllvm-6d8eb156e6be727570b300bac7712f745a318c7d.tar.gz
llvm-6d8eb156e6be727570b300bac7712f745a318c7d.tar.bz2
llvm-6d8eb156e6be727570b300bac7712f745a318c7d.tar.xz
Add helper functions for computing the Location of load, store,
and vaarg instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemDepPrinter.cpp')
-rw-r--r--lib/Analysis/MemDepPrinter.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/Analysis/MemDepPrinter.cpp b/lib/Analysis/MemDepPrinter.cpp
index 90a7c576f0..64d215c37c 100644
--- a/lib/Analysis/MemDepPrinter.cpp
+++ b/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!");