From edf349aba6ad809d1c41d79d5eb10079cad69a6e Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Wed, 19 Apr 2006 15:34:02 +0000 Subject: deal with memchr llvm-svn: 27830 --- llvm/lib/Analysis/DataStructure/Local.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp') diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 75d1f4e0bdc..738a105e2c6 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/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. -- cgit v1.2.3