[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jan 31 16:18:46 PST 2005
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.30 -> 1.31
---
Log message:
Fix a problem where we could infinitely recurse on phi nodes.
---
Diffs of the changes: (+1 -1)
ScalarEvolution.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.30 llvm/lib/Analysis/ScalarEvolution.cpp:1.31
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.30 Mon Dec 6 22:03:45 2004
+++ llvm/lib/Analysis/ScalarEvolution.cpp Mon Jan 31 18:18:30 2005
@@ -1163,7 +1163,7 @@
std::set<Instruction*> &UpdatedInsts) {
std::map<Value*, SCEVHandle>::iterator SI = Scalars.find(I);
if (SI == Scalars.end()) return; // This scalar wasn't previous processed.
- if (UpdatedInsts.insert(I).second) {
+ if (UpdatedInsts.insert(I).second && !isa<PHINode>(PN)) {
Scalars.erase(SI); // Remove the old entry
getSCEV(I); // Calculate the new entry
More information about the llvm-commits
mailing list