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 | 92e2196f0b651d5174d223d7509b3014d5773996 (patch) | |
tree | c956934bbb9e28d04ffd06c0533247e425e6c8a8 /lib/Analysis/DataStructure | |
parent | 0cafa92371ce020ce19e9aacf1a96f8c8a7bb47a (diff) | |
download | external_llvm-92e2196f0b651d5174d223d7509b3014d5773996.zip external_llvm-92e2196f0b651d5174d223d7509b3014d5773996.tar.gz external_llvm-92e2196f0b651d5174d223d7509b3014d5773996.tar.bz2 |
stupid stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index e4de3cb..75d1f4e 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/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" || |