From f6069577fa6e20500de9bb6af3579e7872acf321 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 29 Dec 2008 20:51:17 +0000 Subject: [PATCH] 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 --- llvm/lib/Transforms/IPO/AddReadAttrs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/Transforms/IPO/AddReadAttrs.cpp b/llvm/lib/Transforms/IPO/AddReadAttrs.cpp index 2835d5e9f361..96c1427e0e0f 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(V)) return GV->isConstant(); + // Could look through phi nodes and selects here, but it doesn't seem + // to be useful in practice. return false; }