diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-29 20:04:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-29 20:04:24 +0000 |
commit | 77b505670c855bea3e15cabda4b7c4df222f4c48 (patch) | |
tree | a2ca2856bb2da4c6b0e241341a7090e37908dbc8 | |
parent | c05138387a7ce3de215cbf6df2745ab77af4f85f (diff) |
learn about some more functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20929 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index ed9d54953e..9ed21e0690 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -612,11 +612,12 @@ bool Andersens::AddConstraintsForExternalCall(CallSite CS, Function *F) { // These functions don't induce any points-to constraints. if (F->getName() == "printf" || F->getName() == "fprintf" || F->getName() == "sprintf" || - F->getName() == "fgets" || + F->getName() == "fgets" || F->getName() == "__assert_fail" || F->getName() == "open" || F->getName() == "fopen" || F->getName() == "fclose" || F->getName() == "fflush" || F->getName() == "rewind" || - F->getName() == "atoi" || F->getName() == "unlink" || + F->getName() == "atoi" || F->getName() == "atol" || + F->getName() == "unlink" || F->getName() == "sscanf" || F->getName() == "fscanf" || F->getName() == "llvm.memset" || F->getName() == "memcmp" || F->getName() == "read" || F->getName() == "write") @@ -633,8 +634,10 @@ bool Andersens::AddConstraintsForExternalCall(CallSite CS, Function *F) { return true; } - if (F->getName() == "realloc") { - // Result = Arg + // Result = Arg0 + if (F->getName() == "realloc" || F->getName() == "strchr" || + F->getName() == "strrchr" || F->getName() == "strstr" || + F->getName() == "strtok") { Constraints.push_back(Constraint(Constraint::Copy, getNode(CS.getInstruction()), getNode(CS.getArgument(0)))); |