deal with memchr

llvm-svn: 27830
This commit is contained in:
Andrew Lenharth 2006-04-19 15:34:02 +00:00
parent 7f2cee3d3e
commit edf349aba6
1 changed files with 7 additions and 0 deletions

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.