diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-16 18:37:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-16 18:37:40 +0000 |
commit | eee33b269133330550becaa319c6919a42c5f0a5 (patch) | |
tree | 0511cb9f1ea7b2673c85a6d7e08b2a6b697b787e /lib/Analysis/DataStructure/Local.cpp | |
parent | e0f636a0686141818cb09fd62d3ff9a0ba352825 (diff) |
memset and bcopy and now unified by the llvm.memset intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 9ee4425421..d0bac6d71e 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -468,6 +468,11 @@ void GraphBuilder::visitCallSite(CallSite CS) { N->setModifiedMarker()->setReadMarker(); return; } + case Intrinsic::memset: + // Mark the memory modified. + if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) + N->setModifiedMarker(); + return; default: if (F->getName() == "calloc") { setDestTo(*CS.getInstruction(), @@ -479,20 +484,6 @@ void GraphBuilder::visitCallSite(CallSite CS) { if (DSNode *N = RetNH.getNode()) N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); return; - } else if (F->getName() == "memset") { - // Merge the first argument with the return value, and mark the memory - // modified. - DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); - RetNH.mergeWith(getValueDest(**CS.arg_begin())); - if (DSNode *N = RetNH.getNode()) - N->setModifiedMarker(); - return; - } else if (F->getName() == "bzero") { - // Mark the memory modified. - DSNodeHandle H = getValueDest(**CS.arg_begin()); - if (DSNode *N = H.getNode()) - N->setModifiedMarker(); - return; } else if (F->getName() == "fopen" && CS.arg_end()-CS.arg_begin() == 2){ // fopen reads the mode argument strings. CallSite::arg_iterator AI = CS.arg_begin(); |