summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/Local.cpp
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
commitedf349aba6ad809d1c41d79d5eb10079cad69a6e (patch)
treeb7c92f214550822d7b328e18b2b3d71a1a67b01c /llvm/lib/Analysis/DataStructure/Local.cpp
parent7f2cee3d3e50b9b1e6074f08bbd7febcd3072f22 (diff)
downloadbcm5719-llvm-edf349aba6ad809d1c41d79d5eb10079cad69a6e.tar.gz
bcm5719-llvm-edf349aba6ad809d1c41d79d5eb10079cad69a6e.zip
deal with memchr
llvm-svn: 27830
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Local.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp
index 75d1f4e0bdc..738a105e2c6 100644
--- a/llvm/lib/Analysis/DataStructure/Local.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud