summaryrefslogtreecommitdiff
path: root/lib/Analysis/AliasDebugger.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-09-14 21:25:10 +0000
committerDan Gohman <gohman@apple.com>2010-09-14 21:25:10 +0000
commitb2143b6247901ae4eca2192ee134564c4f5f7853 (patch)
tree7991b48f4a6ee8090de80fbb9cb17c6ed75d6227 /lib/Analysis/AliasDebugger.cpp
parentfe3ac088ee0a536f60b3c30ad97703d5d6cd2167 (diff)
downloadllvm-b2143b6247901ae4eca2192ee134564c4f5f7853.tar.gz
llvm-b2143b6247901ae4eca2192ee134564c4f5f7853.tar.bz2
llvm-b2143b6247901ae4eca2192ee134564c4f5f7853.tar.xz
Remove the experimental AliasAnalysis::getDependency interface, which
isn't a good level of abstraction for memdep. Instead, generalize AliasAnalysis::alias and related interfaces with a new Location class for describing a memory location. For now, this is the same Pointer and Size as before, plus an additional field for a TBAA tag. Also, introduce a fixed MD_tbaa metadata tag kind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/AliasDebugger.cpp')
-rw-r--r--lib/Analysis/AliasDebugger.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Analysis/AliasDebugger.cpp b/lib/Analysis/AliasDebugger.cpp
index b9fe64608c..82e705dd1c 100644
--- a/lib/Analysis/AliasDebugger.cpp
+++ b/lib/Analysis/AliasDebugger.cpp
@@ -92,17 +92,18 @@ namespace {
//------------------------------------------------
// Implement the AliasAnalysis API
//
- AliasResult alias(const Value *V1, unsigned V1Size,
- const Value *V2, unsigned V2Size) {
- assert(Vals.find(V1) != Vals.end() && "Never seen value in AA before");
- assert(Vals.find(V2) != Vals.end() && "Never seen value in AA before");
- return AliasAnalysis::alias(V1, V1Size, V2, V2Size);
+ AliasResult alias(const Location &LocA, const Location &LocB) {
+ assert(Vals.find(LocA.Ptr) != Vals.end() &&
+ "Never seen value in AA before");
+ assert(Vals.find(LocB.Ptr) != Vals.end() &&
+ "Never seen value in AA before");
+ return AliasAnalysis::alias(LocA, LocB);
}
ModRefResult getModRefInfo(ImmutableCallSite CS,
- const Value *P, unsigned Size) {
- assert(Vals.find(P) != Vals.end() && "Never seen value in AA before");
- return AliasAnalysis::getModRefInfo(CS, P, Size);
+ const Location &Loc) {
+ assert(Vals.find(Loc.Ptr) != Vals.end() && "Never seen value in AA before");
+ return AliasAnalysis::getModRefInfo(CS, Loc);
}
ModRefResult getModRefInfo(ImmutableCallSite CS1,
@@ -110,9 +111,9 @@ namespace {
return AliasAnalysis::getModRefInfo(CS1,CS2);
}
- bool pointsToConstantMemory(const Value *P) {
- assert(Vals.find(P) != Vals.end() && "Never seen value in AA before");
- return AliasAnalysis::pointsToConstantMemory(P);
+ bool pointsToConstantMemory(const Location &Loc) {
+ assert(Vals.find(Loc.Ptr) != Vals.end() && "Never seen value in AA before");
+ return AliasAnalysis::pointsToConstantMemory(Loc);
}
virtual void deleteValue(Value *V) {