diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-11 21:50:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-11 21:50:19 +0000 |
commit | 6d8eb156e6be727570b300bac7712f745a318c7d (patch) | |
tree | cd4250cc4395e8077f2dac80017fbe44ae96a94b /lib/Analysis/MemDepPrinter.cpp | |
parent | ef5b390263ebe6e22c89cb16faebf0fb3c4ce1ee (diff) |
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.cpp | 13 |
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!"); |