deal with memchr
authorAndrew Lenharth <andrewl@lenharth.org>
Wed, 19 Apr 2006 15:34:02 +0000 (15:34 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Wed, 19 Apr 2006 15:34:02 +0000 (15:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27830 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Local.cpp

index 75d1f4e0bdcaa0548bc74b5ccd04aa1c56385696..738a105e2c6bbc765dd7e4fc44f111896334c568 100644 (file)
@@ -636,6 +636,13 @@ void GraphBuilder::visitCallSite(CallSite CS) {
                 N->setReadMarker();
           }
           return;
+        } else if (F->getName() == "memchr") {
+          DSNodeHandle RetNH = getValueDest(**CS.arg_begin());
+          DSNodeHandle Result = getValueDest(*CS.getInstruction());
+          RetNH.mergeWith(Result);
+          if (DSNode *N = RetNH.getNode())
+            N->setReadMarker();
+          return;
         } else if (F->getName() == "read" || F->getName() == "pipe" ||
                    F->getName() == "wait" || F->getName() == "time") {
           // These functions write all of their pointer operands.