[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Jun 29 23:54:03 PDT 2003
Changes in directory llvm/lib/Analysis/DataStructure:
TopDownClosure.cpp updated: 1.44 -> 1.45
---
Log message:
Do not multiply delete graphs if functions are sharing graphs
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.44 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.45
--- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.44 Sun Jun 29 22:15:25 2003
+++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Sun Jun 29 23:53:08 2003
@@ -45,10 +45,12 @@
// has no way to extend the lifetime of the pass, which screws up ds-aa.
//
void TDDataStructures::releaseMyMemory() {
- return;
- for (hash_map<const Function*, DSGraph*>::iterator I = DSInfo.begin(),
- E = DSInfo.end(); I != E; ++I)
- delete I->second;
+ for (hash_map<Function*, DSGraph*>::iterator I = DSInfo.begin(),
+ E = DSInfo.end(); I != E; ++I) {
+ I->second->getReturnNodes().erase(I->first);
+ if (I->second->getReturnNodes().empty())
+ delete I->second;
+ }
// Empty map so next time memory is released, data structures are not
// re-deleted.
More information about the llvm-commits
mailing list