[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 10 12:20:01 PST 2003
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.90 -> 1.91
---
Log message:
Fix problem breaking GAP, use hasNoReferrers more
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.90 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.91
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.90 Sun Feb 9 12:41:49 2003
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Feb 10 12:18:18 2003
@@ -86,7 +86,7 @@
(*I)->setOffset(0);
// If we have links, merge all of our outgoing links together...
- for (unsigned i = 1, e = Links.size(); i < e; ++i)
+ for (unsigned i = 1; i < Links.size(); ++i)
Links[0].mergeWith(Links[i]);
Links.resize(1);
}
@@ -903,8 +903,8 @@
}
}
- if ((Node->NodeType & ~DSNode::DEAD) == 0 &&
- Node->getReferrers().empty()) { // This node is dead!
+ if ((Node->NodeType & ~DSNode::DEAD) == 0 && Node->hasNoReferrers()) {
+ // This node is dead!
delete Node; // Free memory...
Nodes.erase(Nodes.begin()+i--); // Remove from node list...
}
@@ -1066,7 +1066,7 @@
assert(((N->NodeType & DSNode::GlobalNode) == 0 ||
(Flags & DSGraph::RemoveUnreachableGlobals))
&& "Killing a global?");
- while (!N->getReferrers().empty()) // Rewrite referrers
+ while (!N->hasNoReferrers()) // Rewrite referrers
N->getReferrers().back()->setNode(0);
delete N; // Usecount is zero
}
More information about the llvm-commits
mailing list