unlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.
authorChris Lattner <sabre@nondot.org>
Sun, 27 Sep 2009 21:23:38 +0000 (21:23 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 27 Sep 2009 21:23:38 +0000 (21:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82927 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/FunctionAttrs.cpp

index 14c94da55951fec4f4d5a5fda14a55ec1ae9fd43..58cc909a86c9c6edf418a1b0436ca4ff3a3402c5 100644 (file)
@@ -153,7 +153,7 @@ bool FunctionAttrs::AddReadAttrs(const std::vector<CallGraphNode *> &SCC) {
         // Writes memory.  Just give up.
         return false;
 
-      if (isa<MallocInst>(I) || isMalloc(I))
+      if (isa<MallocInst>(I))
         // malloc claims not to write memory!  PR3754.
         return false;