summaryrefslogtreecommitdiff
path: root/lib/Analysis/AliasAnalysis.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-08 16:45:26 +0000
committerDan Gohman <gohman@apple.com>2010-11-08 16:45:26 +0000
commita25e5dbcc2371352386a01e3c1b8e76dd890272b (patch)
tree2d67b72b4ac69a9de510506f4182d2ac8b62edb8 /lib/Analysis/AliasAnalysis.cpp
parentc80cbf25402e4095fafbb15a2ab1b81cf6feda77 (diff)
downloadllvm-a25e5dbcc2371352386a01e3c1b8e76dd890272b.tar.gz
llvm-a25e5dbcc2371352386a01e3c1b8e76dd890272b.tar.bz2
llvm-a25e5dbcc2371352386a01e3c1b8e76dd890272b.tar.xz
Extend the AliasAnalysis::pointsToConstantMemory interface to allow it
to optionally look for constant or local (alloca) memory. Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select and Phi nodes, and to support looking for local memory. Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that AliasAnalysis knows all the tricks that it knew. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/AliasAnalysis.cpp')
-rw-r--r--lib/Analysis/AliasAnalysis.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp
index 472d57ab40..d513ebbc2a 100644
--- a/lib/Analysis/AliasAnalysis.cpp
+++ b/lib/Analysis/AliasAnalysis.cpp
@@ -49,9 +49,10 @@ AliasAnalysis::alias(const Location &LocA, const Location &LocB) {
return AA->alias(LocA, LocB);
}
-bool AliasAnalysis::pointsToConstantMemory(const Location &Loc) {
+bool AliasAnalysis::pointsToConstantMemory(const Location &Loc,
+ bool OrLocal) {
assert(AA && "AA didn't call InitializeAliasAnalysis in its run method!");
- return AA->pointsToConstantMemory(Loc);
+ return AA->pointsToConstantMemory(Loc, OrLocal);
}
void AliasAnalysis::deleteValue(Value *V) {