memset and bcopy and now unified by the llvm.memset intrinsic

llvm-svn: 11503
This commit is contained in:
Chris Lattner 2004-02-16 18:37:40 +00:00
parent 544c9781db
commit cedfcf5bca
1 changed files with 5 additions and 14 deletions

View File

@ -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();