summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-12-29 20:51:17 +0000
committerDuncan Sands <baldrick@free.fr>2008-12-29 20:51:17 +0000
commitf6069577fa6e20500de9bb6af3579e7872acf321 (patch)
treed8126354c2ac85261c95f909d7956948b51c48a3 /llvm/lib
parenta27b796fec12412105e62b5dd35cd478c6ea16cb (diff)
downloadbcm5719-llvm-f6069577fa6e20500de9bb6af3579e7872acf321.tar.gz
bcm5719-llvm-f6069577fa6e20500de9bb6af3579e7872acf321.zip
Experiments show that looking through phi nodes
and select instructions doesn't buy anything here except extra complexity: the only difference in the entire testsuite was that a readonly function became readnone in MiBench/consumer-typeset. Add a comment about this. llvm-svn: 61478
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/AddReadAttrs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/AddReadAttrs.cpp b/llvm/lib/Transforms/IPO/AddReadAttrs.cpp
index 2835d5e9f36..96c1427e0e0 100644
--- a/llvm/lib/Transforms/IPO/AddReadAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/AddReadAttrs.cpp
@@ -64,6 +64,8 @@ bool AddReadAttrs::PointsToLocalMemory(Value *V) {
// A global constant counts as local memory for our purposes.
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
return GV->isConstant();
+ // Could look through phi nodes and selects here, but it doesn't seem
+ // to be useful in practice.
return false;
}
OpenPOWER on IntegriCloud