Now that the MallocInst no longer exists, this workaround for
authorDuncan Sands <baldrick@free.fr>
Sat, 30 Oct 2010 16:12:16 +0000 (16:12 +0000)
committerDuncan Sands <baldrick@free.fr>
Sat, 30 Oct 2010 16:12:16 +0000 (16:12 +0000)
it claiming not to have side-effects is no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117789 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/FunctionAttrs.cpp

index 39f48145af1d9ab7fc69b59f91067840711fc834..9e117daa68eb912c2fa85237bf4650f7465d52e8 100644 (file)
@@ -26,7 +26,6 @@
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/CallGraph.h"
 #include "llvm/Analysis/CaptureTracking.h"
-#include "llvm/Analysis/MemoryBuiltins.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/UniqueVector.h"
@@ -203,10 +202,6 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) {
         // Writes memory.  Just give up.
         return false;
 
-      if (isMalloc(I))
-        // malloc claims not to write memory!  PR3754.
-        return false;
-
       // If this instruction may read memory, remember that.
       ReadsMemory |= I->mayReadFromMemory();
     }