From: Andrew Lenharth Date: Wed, 19 Apr 2006 15:34:02 +0000 (+0000) Subject: deal with memchr X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=613926904f34a48d1ef27ff1bfda5062859a3358;p=oota-llvm.git deal with memchr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27830 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 75d1f4e0bdc..738a105e2c6 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -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.