From cff83a2f242f686503a4e54df00aed3f0fa321ca Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 9 Nov 2003 03:32:52 +0000 Subject: [PATCH] Add support for memmove llvm-svn: 9824 --- llvm/lib/Analysis/DataStructure/Local.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index f3406b76990e..0aca21a437ba 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/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());