deal with memchr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth 2006-04-19 15:34:02 +00:00
parent 5e091f3e32
commit 613926904f

View 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.