summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-09 03:32:52 +0000
committerChris Lattner <sabre@nondot.org>2003-11-09 03:32:52 +0000
commitcff83a2f242f686503a4e54df00aed3f0fa321ca (patch)
tree2dd5eee9c3d3b95bac67875cc5613a519b622486 /llvm/lib/Analysis/DataStructure/Local.cpp
parentc3c242c3aca5c2d2ce9de80f602bab9e200e8a78 (diff)
downloadbcm5719-llvm-cff83a2f242f686503a4e54df00aed3f0fa321ca.tar.gz
bcm5719-llvm-cff83a2f242f686503a4e54df00aed3f0fa321ca.zip
Add support for memmove
llvm-svn: 9824
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Local.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp
index f3406b76990..0aca21a437b 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());
OpenPOWER on IntegriCloud