diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-04-19 03:45:25 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-04-19 03:45:25 +0000 |
commit | 7c8be502e9e34aec87fcdb96566250e08a7ef20a (patch) | |
tree | 67c345fb53b26405dbfaea3af2adff8d93257696 /llvm/lib/Analysis/DataStructure/Local.cpp | |
parent | 2bdd6fe9ef9650f613405ba9e9d9c0fb8dfb866c (diff) | |
download | bcm5719-llvm-7c8be502e9e34aec87fcdb96566250e08a7ef20a.tar.gz bcm5719-llvm-7c8be502e9e34aec87fcdb96566250e08a7ef20a.zip |
stupid stuff
llvm-svn: 27821
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Local.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index e4de3cb7321..75d1f4e0bdc 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -591,8 +591,9 @@ void GraphBuilder::visitCallSite(CallSite CS) { } } - if (F->getName() == "calloc" || F->getName() == "posix_memalign" || - F->getName() == "memalign" || F->getName() == "valloc") { + if ((F->isExternal() && F->getName() == "calloc") + || F->getName() == "posix_memalign" + || F->getName() == "memalign" || F->getName() == "valloc") { setDestTo(*CS.getInstruction(), createNode()->setHeapNodeMarker()->setModifiedMarker()); return; @@ -611,7 +612,10 @@ void GraphBuilder::visitCallSite(CallSite CS) { if (DSNode *N = RetNH.getNode()) N->setModifiedMarker()->setReadMarker(); return; - + } else if (F->getName() == "free") { + // Mark that the node is written to... + if (DSNode *N = getValueDest(**CS.arg_begin()).getNode()) + N->setModifiedMarker()->setHeapNodeMarker(); } else if (F->getName() == "atoi" || F->getName() == "atof" || F->getName() == "atol" || F->getName() == "atoll" || F->getName() == "remove" || F->getName() == "unlink" || |