[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 25 12:17:01 PDT 2005
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.239 -> 1.240
---
Log message:
Don't mess up SCC traversal when a node has null edges out of it.
---
Diffs of the changes: (+6 -5)
DataStructure.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.239 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.240
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.239 Thu Apr 21 16:07:28 2005
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Apr 25 14:16:17 2005
@@ -1430,11 +1430,12 @@
// Otherwise, check all successors.
bool AnyDirectSuccessorsReachClonedNodes = false;
for (DSNode::const_edge_iterator EI = N->edge_begin(), EE = N->edge_end();
- EI != EE; ++EI) {
- std::pair<unsigned, bool> &SuccInfo = VisitForSCCs(EI->getNode());
- if (SuccInfo.first < Min) Min = SuccInfo.first;
- AnyDirectSuccessorsReachClonedNodes |= SuccInfo.second;
- }
+ EI != EE; ++EI)
+ if (DSNode *Succ = EI->getNode()) {
+ std::pair<unsigned, bool> &SuccInfo = VisitForSCCs(Succ);
+ if (SuccInfo.first < Min) Min = SuccInfo.first;
+ AnyDirectSuccessorsReachClonedNodes |= SuccInfo.second;
+ }
if (Min != MyId)
return ThisNodeInfo; // Part of a large SCC. Leave self on stack.
More information about the llvm-commits
mailing list