summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9130bad71fb80ad6174c23fd073cadff8223d168 (patch)
tree8404e603658ba45d23dcf149cc872d65718f788a /llvm/lib/Analysis/AliasAnalysis.cpp
parent0b56778d65717534b118742d56deb67306b52b9d (diff)
downloadbcm5719-llvm-9130bad71fb80ad6174c23fd073cadff8223d168.tar.gz
bcm5719-llvm-9130bad71fb80ad6174c23fd073cadff8223d168.zip
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. llvm-svn: 118412
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/AliasAnalysis.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index 472d57ab402..d513ebbc2a9 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud