summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-29 06:52:20 +0000
committerChris Lattner <sabre@nondot.org>2005-03-29 06:52:20 +0000
commit4de57fd9e9aac88a54bad87ab66fedb611b6f628 (patch)
tree61b5d6047eef22dd627024f238260afd24ab5dea /lib
parentb1515fe52270506faf1cff3184606cf76ace892b (diff)
add some more functions, ignore setcc for constraints!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/IPA/Andersens.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index c665038aa19..9c17cab0e62 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -328,6 +328,7 @@ namespace {
void visitGetElementPtrInst(GetElementPtrInst &GEP);
void visitPHINode(PHINode &PN);
void visitCastInst(CastInst &CI);
+ void visitSetCondInst(SetCondInst &SCI) {} // NOOP!
void visitSelectInst(SelectInst &SI);
void visitVANext(VANextInst &I);
void visitVAArg(VAArgInst &I);
@@ -609,16 +610,20 @@ 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() == "open" || F->getName() == "fopen" ||
F->getName() == "fclose" || F->getName() == "fflush" ||
- F->getName() == "atoi" || F->getName() == "sscanf" ||
+ F->getName() == "rewind" ||
+ F->getName() == "atoi" || F->getName() == "unlink" ||
+ F->getName() == "sscanf" || F->getName() == "fscanf" ||
F->getName() == "llvm.memset" || F->getName() == "memcmp" ||
F->getName() == "read" || F->getName() == "write")
return true;
// These functions do induce points-to edges.
- if (F->getName() == "llvm.memcpy" || F->getName() == "llvm.memmove") {
+ if (F->getName() == "llvm.memcpy" || F->getName() == "llvm.memmove" ||
+ F->getName() == "memmove") {
// Note: this is a poor approximation, this says Dest = Src, instead of
// *Dest = *Src.
Constraints.push_back(Constraint(Constraint::Copy,
@@ -647,8 +652,8 @@ bool Andersens::AddConstraintsForExternalCall(CallSite CS, Function *F) {
void Andersens::CollectConstraints(Module &M) {
// First, the universal set points to itself.
GraphNodes[UniversalSet].addPointerTo(&GraphNodes[UniversalSet]);
- Constraints.push_back(Constraint(Constraint::Load, &GraphNodes[UniversalSet],
- &GraphNodes[UniversalSet]));
+ //Constraints.push_back(Constraint(Constraint::Load, &GraphNodes[UniversalSet],
+ // &GraphNodes[UniversalSet]));
Constraints.push_back(Constraint(Constraint::Store, &GraphNodes[UniversalSet],
&GraphNodes[UniversalSet]));