[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 4 15:23:34 PDT 2005
Changes in directory llvm/lib/Analysis/IPA:
Andersens.cpp updated: 1.21 -> 1.22
---
Log message:
do not dereference an extra layer of pointers to determine if an external
call can modify a memory location. This fixes
test/Regression/Analysis/Andersens/modreftest.ll
---
Diffs of the changes: (+5 -12)
Andersens.cpp | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.21 llvm/lib/Analysis/IPA/Andersens.cpp:1.22
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.21 Tue Mar 29 14:36:05 2005
+++ llvm/lib/Analysis/IPA/Andersens.cpp Mon Apr 4 17:23:21 2005
@@ -374,19 +374,12 @@
Node *N1 = getNode(P);
bool PointsToUniversalSet = false;
- for (Node::iterator NI = N1->begin(), E = N1->end(); NI != E; ++NI) {
- Node *PN = *NI;
- if (PN->begin() == PN->end())
- continue; // P doesn't point to anything.
- // Get the first pointee.
- Node *FirstPointee = *PN->begin();
- if (FirstPointee == &GraphNodes[UniversalSet]) {
- PointsToUniversalSet = true;
- break;
- }
- }
+ if (N1->begin() == N1->end())
+ return NoModRef; // P doesn't point to anything.
- if (!PointsToUniversalSet)
+ // Get the first pointee.
+ Node *FirstPointee = *N1->begin();
+ if (FirstPointee != &GraphNodes[UniversalSet])
return NoModRef; // P doesn't point to the universal set.
}
More information about the llvm-commits
mailing list