From: Chris Lattner Date: Sun, 9 Nov 2003 03:32:52 +0000 (+0000) Subject: Add support for memmove X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=67ce57ac49da7e3ca58df573c81d91175784b433;p=oota-llvm.git Add support for memmove git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9824 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index f3406b76990..0aca21a437b 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -446,6 +446,15 @@ void GraphBuilder::visitCallSite(CallSite CS) { if (DSNode *N = RetNH.getNode()) N->setModifiedMarker(); return; + } else if (F->getName() == "memmove") { + // Merge the first & second arguments with the result, and mark the + // memory read and modified. + DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); + RetNH.mergeWith(getValueDest(**CS.arg_begin())); + RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); + if (DSNode *N = RetNH.getNode()) + N->setModifiedMarker()->setReadMarker(); + return; } else if (F->getName() == "bzero") { // Mark the memory modified. DSNodeHandle H = getValueDest(**CS.arg_begin());