projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NVPTX: Use RAUW instead of reinventing the wheel
[oota-llvm.git]
/
lib
/
Analysis
/
AliasAnalysis.cpp
diff --git
a/lib/Analysis/AliasAnalysis.cpp
b/lib/Analysis/AliasAnalysis.cpp
index 8b8106b950a0a5f1f939ce7c152bc1bfa373b8a3..8aee8b1aa335dca3f10ad11bb80c93db3bc143ae 100644
(file)
--- a/
lib/Analysis/AliasAnalysis.cpp
+++ b/
lib/Analysis/AliasAnalysis.cpp
@@
-252,35
+252,45
@@
AliasAnalysis::getModRefBehavior(const Function *F) {
//===----------------------------------------------------------------------===//
AliasAnalysis::Location AliasAnalysis::getLocation(const LoadInst *LI) {
//===----------------------------------------------------------------------===//
AliasAnalysis::Location AliasAnalysis::getLocation(const LoadInst *LI) {
+ AAMDNodes AATags;
+ LI->getAAMetadata(AATags);
+
return Location(LI->getPointerOperand(),
return Location(LI->getPointerOperand(),
- getTypeStoreSize(LI->getType()),
- LI->getMetadata(LLVMContext::MD_tbaa));
+ getTypeStoreSize(LI->getType()), AATags);
}
AliasAnalysis::Location AliasAnalysis::getLocation(const StoreInst *SI) {
}
AliasAnalysis::Location AliasAnalysis::getLocation(const StoreInst *SI) {
+ AAMDNodes AATags;
+ SI->getAAMetadata(AATags);
+
return Location(SI->getPointerOperand(),
return Location(SI->getPointerOperand(),
- getTypeStoreSize(SI->getValueOperand()->getType()),
- SI->getMetadata(LLVMContext::MD_tbaa));
+ getTypeStoreSize(SI->getValueOperand()->getType()), AATags);
}
AliasAnalysis::Location AliasAnalysis::getLocation(const VAArgInst *VI) {
}
AliasAnalysis::Location AliasAnalysis::getLocation(const VAArgInst *VI) {
- return Location(VI->getPointerOperand(),
- UnknownSize,
- VI->getMetadata(LLVMContext::MD_tbaa));
+ AAMDNodes AATags;
+ VI->getAAMetadata(AATags);
+
+ return Location(VI->getPointerOperand(), UnknownSize, AATags);
}
AliasAnalysis::Location
AliasAnalysis::getLocation(const AtomicCmpXchgInst *CXI) {
}
AliasAnalysis::Location
AliasAnalysis::getLocation(const AtomicCmpXchgInst *CXI) {
+ AAMDNodes AATags;
+ CXI->getAAMetadata(AATags);
+
return Location(CXI->getPointerOperand(),
getTypeStoreSize(CXI->getCompareOperand()->getType()),
return Location(CXI->getPointerOperand(),
getTypeStoreSize(CXI->getCompareOperand()->getType()),
-
CXI->getMetadata(LLVMContext::MD_tbaa)
);
+
AATags
);
}
AliasAnalysis::Location
AliasAnalysis::getLocation(const AtomicRMWInst *RMWI) {
}
AliasAnalysis::Location
AliasAnalysis::getLocation(const AtomicRMWInst *RMWI) {
+ AAMDNodes AATags;
+ RMWI->getAAMetadata(AATags);
+
return Location(RMWI->getPointerOperand(),
return Location(RMWI->getPointerOperand(),
- getTypeStoreSize(RMWI->getValOperand()->getType()),
- RMWI->getMetadata(LLVMContext::MD_tbaa));
+ getTypeStoreSize(RMWI->getValOperand()->getType()), AATags);
}
AliasAnalysis::Location
}
AliasAnalysis::Location
@@
-289,11
+299,12
@@
AliasAnalysis::getLocationForSource(const MemTransferInst *MTI) {
if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))
Size = C->getValue().getZExtValue();
if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))
Size = C->getValue().getZExtValue();
- // memcpy/memmove can have
TB
AA tags. For memcpy, they apply
+ // memcpy/memmove can have AA tags. For memcpy, they apply
// to both the source and the destination.
// to both the source and the destination.
- MDNode *TBAATag = MTI->getMetadata(LLVMContext::MD_tbaa);
-
- return Location(MTI->getRawSource(), Size, TBAATag);
+ AAMDNodes AATags;
+ MTI->getAAMetadata(AATags);
+
+ return Location(MTI->getRawSource(), Size, AATags);
}
AliasAnalysis::Location
}
AliasAnalysis::Location
@@
-302,11
+313,12
@@
AliasAnalysis::getLocationForDest(const MemIntrinsic *MTI) {
if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))
Size = C->getValue().getZExtValue();
if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))
Size = C->getValue().getZExtValue();
- // memcpy/memmove can have
TB
AA tags. For memcpy, they apply
+ // memcpy/memmove can have AA tags. For memcpy, they apply
// to both the source and the destination.
// to both the source and the destination.
- MDNode *TBAATag = MTI->getMetadata(LLVMContext::MD_tbaa);
-
- return Location(MTI->getRawDest(), Size, TBAATag);
+ AAMDNodes AATags;
+ MTI->getMetadata(AATags);
+
+ return Location(MTI->getRawDest(), Size, AATags);
}
}