From: Duncan Sands Date: Mon, 29 Dec 2008 20:51:17 +0000 (+0000) Subject: Experiments show that looking through phi nodes X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2964fe37aee3696e887dc50f52926df3ba51f4c7;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61478 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/AddReadAttrs.cpp b/lib/Transforms/IPO/AddReadAttrs.cpp index 2835d5e9f36..96c1427e0e0 100644 --- a/lib/Transforms/IPO/AddReadAttrs.cpp +++ b/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(V)) return GV->isConstant(); + // Could look through phi nodes and selects here, but it doesn't seem + // to be useful in practice. return false; }