[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 3 16:52:03 PST 2003
Changes in directory llvm/lib/Analysis/DataStructure:
TopDownClosure.cpp updated: 1.33 -> 1.34
---
Log message:
Hack to work around deficiency in pass infrastructure
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.33 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.34
--- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.33 Fri Jan 31 22:51:55 2003
+++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Mon Feb 3 16:51:28 2003
@@ -13,8 +13,10 @@
#include "llvm/DerivedTypes.h"
#include "Support/Statistic.h"
-static RegisterAnalysis<TDDataStructures>
-Y("tddatastructure", "Top-down Data Structure Analysis Closure");
+namespace {
+ RegisterAnalysis<TDDataStructures> // Register the pass
+ Y("tddatastructure", "Top-down Data Structure Analysis Closure");
+}
// run - Calculate the top down data structure graphs for each function in the
// program.
@@ -39,7 +41,10 @@
// releaseMemory - If the pass pipeline is done with this pass, we can release
// our memory... here...
//
-void TDDataStructures::releaseMemory() {
+// FIXME: This should be releaseMemory and will work fine, except that LoadVN
+// has no way to extend the lifetime of the pass, which screws up ds-aa.
+//
+void TDDataStructures::releaseMyMemory() {
for (hash_map<const Function*, DSGraph*>::iterator I = DSInfo.begin(),
E = DSInfo.end(); I != E; ++I)
delete I->second;
@@ -206,3 +211,4 @@
calculateGraph(*I->first);
}
}
+
More information about the llvm-commits
mailing list