[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Tue Apr 18 20:46:17 PDT 2006



Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.148 -> 1.149
---
Log message:

stupid stuff

---
Diffs of the changes:  (+7 -3)

 Local.cpp |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)


Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.148 llvm/lib/Analysis/DataStructure/Local.cpp:1.149
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.148	Tue Apr 18 17:36:11 2006
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Tue Apr 18 22:45:25 2006
@@ -591,8 +591,9 @@
           }
         }
 
-        if (F->getName() == "calloc" || F->getName() == "posix_memalign" ||
-            F->getName() == "memalign" || F->getName() == "valloc") {
+        if ((F->isExternal() && F->getName() == "calloc") 
+            || F->getName() == "posix_memalign"
+            || F->getName() == "memalign" || F->getName() == "valloc") {
           setDestTo(*CS.getInstruction(),
                     createNode()->setHeapNodeMarker()->setModifiedMarker());
           return;
@@ -611,7 +612,10 @@
           if (DSNode *N = RetNH.getNode())
             N->setModifiedMarker()->setReadMarker();
           return;
-
+        } else if (F->getName() == "free") {
+          // Mark that the node is written to...
+          if (DSNode *N = getValueDest(**CS.arg_begin()).getNode())
+            N->setModifiedMarker()->setHeapNodeMarker();
         } else if (F->getName() == "atoi" || F->getName() == "atof" ||
                    F->getName() == "atol" || F->getName() == "atoll" ||
                    F->getName() == "remove" || F->getName() == "unlink" ||






More information about the llvm-commits mailing list