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

Chris Lattner lattner at cs.uiuc.edu
Sat Nov 8 21:34:01 PST 2003


Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.68 -> 1.69

---
Log message:

Add support for memmove


---
Diffs of the changes:  (+9 -0)

Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.68 llvm/lib/Analysis/DataStructure/Local.cpp:1.69
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.68	Sat Nov  8 15:55:50 2003
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Sat Nov  8 21:32:52 2003
@@ -446,6 +446,15 @@
         if (DSNode *N = RetNH.getNode())
           N->setModifiedMarker();
         return;
+      } else if (F->getName() == "memmove") {
+        // Merge the first & second arguments with the result, and mark the
+        // memory read and modified.
+        DSNodeHandle RetNH = getValueDest(*CS.getInstruction());
+        RetNH.mergeWith(getValueDest(**CS.arg_begin()));
+        RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1)));
+        if (DSNode *N = RetNH.getNode())
+          N->setModifiedMarker()->setReadMarker();
+        return;
       } else if (F->getName() == "bzero") {
         // Mark the memory modified.
         DSNodeHandle H = getValueDest(**CS.arg_begin());





More information about the llvm-commits mailing list