aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-04-19 15:34:02 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-04-19 15:34:02 +0000
commit613926904f34a48d1ef27ff1bfda5062859a3358 (patch)
treeeaba01f7cedc1651034e3f1e15aa88482bd85fd5 /lib/Analysis
parent5e091f3e329a28918130f246c30e4e10d120f36b (diff)
deal with memchr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 75d1f4e0bd..738a105e2c 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -636,6 +636,13 @@ void GraphBuilder::visitCallSite(CallSite CS) {
N->setReadMarker();
}
return;
+ } else if (F->getName() == "memchr") {
+ DSNodeHandle RetNH = getValueDest(**CS.arg_begin());
+ DSNodeHandle Result = getValueDest(*CS.getInstruction());
+ RetNH.mergeWith(Result);
+ if (DSNode *N = RetNH.getNode())
+ N->setReadMarker();
+ return;
} else if (F->getName() == "read" || F->getName() == "pipe" ||
F->getName() == "wait" || F->getName() == "time") {
// These functions write all of their pointer operands.