[llvm-commits] [poolalloc] r39985 - in /poolalloc/trunk: include/dsa/CallTargets.h include/dsa/DataStructure.h include/poolalloc/PoolAllocate.h lib/DSA/DataStructureAA.cpp lib/DSA/DataStructureOpt.cpp lib/DSA/DataStructureStats.cpp lib/DSA/GraphChecker.cpp lib/DSA/Steensgaard.cpp lib/Makefile
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Tue Jul 17 14:44:19 PDT 2007
Author: alenhar2
Date: Tue Jul 17 16:44:18 2007
New Revision: 39985
URL: http://llvm.org/viewvc/llvm-project?rev=39985&view=rev
Log:
unbitrot DSA, poolalloc still doesn't compile
Modified:
poolalloc/trunk/include/dsa/CallTargets.h
poolalloc/trunk/include/dsa/DataStructure.h
poolalloc/trunk/include/poolalloc/PoolAllocate.h
poolalloc/trunk/lib/DSA/DataStructureAA.cpp
poolalloc/trunk/lib/DSA/DataStructureOpt.cpp
poolalloc/trunk/lib/DSA/DataStructureStats.cpp
poolalloc/trunk/lib/DSA/GraphChecker.cpp
poolalloc/trunk/lib/DSA/Steensgaard.cpp
poolalloc/trunk/lib/Makefile
Modified: poolalloc/trunk/include/dsa/CallTargets.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/CallTargets.h?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/CallTargets.h (original)
+++ poolalloc/trunk/include/dsa/CallTargets.h Tue Jul 17 16:44:18 2007
@@ -30,6 +30,9 @@
void findIndTargets(Module &M);
public:
+ static char ID;
+ CallTargetFinder() : ModulePass((intptr_t)&ID) {}
+
virtual bool runOnModule(Module &M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
Modified: poolalloc/trunk/include/dsa/DataStructure.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DataStructure.h (original)
+++ poolalloc/trunk/include/dsa/DataStructure.h Tue Jul 17 16:44:18 2007
@@ -76,7 +76,8 @@
void formGlobalECs();
- DataStructures() :TD(0), GraphSource(0), GlobalsGraph(0) {}
+ DataStructures(intptr_t id)
+ :ModulePass(id), TD(0), GraphSource(0), GlobalsGraph(0) {}
public:
@@ -116,7 +117,8 @@
//
class LocalDataStructures : public DataStructures {
public:
- LocalDataStructures() :DataStructures() {}
+ static char ID;
+ LocalDataStructures() : DataStructures((intptr_t)&ID) {}
~LocalDataStructures() { releaseMemory(); }
virtual bool runOnModule(Module &M);
@@ -142,7 +144,8 @@
// functions and generates graphs for them.
class StdLibDataStructures : public DataStructures {
public:
- StdLibDataStructures() :DataStructures() {}
+ static char ID;
+ StdLibDataStructures() : DataStructures((intptr_t)&ID) {}
~StdLibDataStructures() { releaseMemory(); }
virtual bool runOnModule(Module &M);
@@ -176,8 +179,10 @@
std::map<std::vector<Function*>,
std::pair<DSGraph*, std::vector<DSNodeHandle> > > *IndCallGraphMap;
+ BUDataStructures(intptr_t id) : DataStructures(id) {}
public:
- BUDataStructures() : DataStructures() {}
+ static char ID;
+ BUDataStructures() : DataStructures((intptr_t)&ID) {}
~BUDataStructures() { releaseMyMemory(); }
virtual bool runOnModule(Module &M);
@@ -261,7 +266,8 @@
std::map<std::vector<Function*>, DSGraph*> IndCallMap;
public:
- TDDataStructures() :DataStructures() {}
+ static char ID;
+ TDDataStructures() : DataStructures((intptr_t)&ID) {}
~TDDataStructures() { releaseMyMemory(); }
virtual bool runOnModule(Module &M);
@@ -301,7 +307,12 @@
/// their callers graphs, making the result more useful for things like pool
/// allocation.
///
-struct CompleteBUDataStructures : public BUDataStructures {
+class CompleteBUDataStructures : public BUDataStructures {
+public:
+ static char ID;
+ CompleteBUDataStructures() : BUDataStructures((intptr_t)&ID) {}
+ ~CompleteBUDataStructures() { releaseMyMemory(); }
+
virtual bool runOnModule(Module &M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -357,9 +368,13 @@
EquivalenceClasses<GlobalValue*> GlobalECs;
public:
+ static char ID;
+ EquivClassGraphs() : ModulePass((intptr_t)&ID) {}
+
/// EquivClassGraphs - Computes the equivalence classes and then the
/// folded DS graphs for each class.
///
+
virtual bool runOnModule(Module &M);
/// print - Print out the analysis results...
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Tue Jul 17 16:44:18 2007
@@ -147,12 +147,13 @@
std::map<const DSNode*, Value*> GlobalNodes;
public:
+ static char ID;
#ifdef SAFECODE
PoolAllocate(bool passAllArguments = true)
- : PassAllArguments(passAllArguments) {}
+ : ModulePass((intptr_t)&ID), PassAllArguments(passAllArguments) {}
#else
PoolAllocate(bool passAllArguments = false)
- : PassAllArguments(passAllArguments) {}
+ : ModulePass((intptr_t)&ID), PassAllArguments(passAllArguments) {}
#endif
bool runOnModule(Module &M);
Modified: poolalloc/trunk/lib/DSA/DataStructureAA.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructureAA.cpp?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructureAA.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructureAA.cpp Tue Jul 17 16:44:18 2007
@@ -36,7 +36,8 @@
CallSite MapCS;
std::multimap<DSNode*, const DSNode*> CallerCalleeMap;
public:
- DSAA() : TD(0) {}
+ static char ID;
+ DSAA() : ModulePass((intptr_t)&ID), TD(0) {}
~DSAA() {
InvalidateCache();
}
Modified: poolalloc/trunk/lib/DSA/DataStructureOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructureOpt.cpp?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructureOpt.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructureOpt.cpp Tue Jul 17 16:44:18 2007
@@ -29,6 +29,9 @@
class DSOpt : public ModulePass {
TDDataStructures *TD;
public:
+ static char ID;
+ DSOpt() : ModulePass((intptr_t)&ID) {};
+
bool runOnModule(Module &M) {
TD = &getAnalysis<TDDataStructures>();
bool Changed = OptimizeGlobals(M);
Modified: poolalloc/trunk/lib/DSA/DataStructureStats.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructureStats.cpp?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructureStats.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructureStats.cpp Tue Jul 17 16:44:18 2007
@@ -43,6 +43,9 @@
DSNode *getNodeForValue(Value *V);
bool isNodeForValueCollapsed(Value *V);
public:
+ static char ID;
+ DSGraphStats() : FunctionPass((intptr_t)&ID) {}
+
/// Driver functions to compute the Load/Store Dep. Graph per function.
bool runOnFunction(Function& F);
Modified: poolalloc/trunk/lib/DSA/GraphChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/GraphChecker.cpp?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/GraphChecker.cpp (original)
+++ poolalloc/trunk/lib/DSA/GraphChecker.cpp Tue Jul 17 16:44:18 2007
@@ -55,6 +55,7 @@
cl::desc("Abort if any of the named symbols are merged together"));
struct DSGC : public FunctionPass {
+ static char ID;
DSGC();
bool doFinalization(Module &M);
bool runOnFunction(Function &F);
@@ -81,7 +82,7 @@
}
-DSGC::DSGC() {
+DSGC::DSGC() : FunctionPass((intptr_t)&ID) {
if (!AbortIfAnyCollapsed && AbortIfCollapsed.empty() &&
CheckFlags.empty() && AbortIfMerged.empty()) {
cerr << "The -datastructure-gc is useless if you don't specify any"
Modified: poolalloc/trunk/lib/DSA/Steensgaard.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Steensgaard.cpp?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Steensgaard.cpp (original)
+++ poolalloc/trunk/lib/DSA/Steensgaard.cpp Tue Jul 17 16:44:18 2007
@@ -29,7 +29,8 @@
EquivalenceClasses<GlobalValue*> GlobalECs; // Always empty
public:
- Steens() : ResultGraph(0) {}
+ static char ID;
+ Steens() : ModulePass((intptr_t)&ID), ResultGraph(0) {}
~Steens() {
releaseMyMemory();
assert(ResultGraph == 0 && "releaseMemory not called?");
Modified: poolalloc/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/Makefile?rev=39985&r1=39984&r2=39985&view=diff
==============================================================================
--- poolalloc/trunk/lib/Makefile (original)
+++ poolalloc/trunk/lib/Makefile Tue Jul 17 16:44:18 2007
@@ -6,6 +6,6 @@
#
# List all of the subdirectories that we will compile.
#
-PARALLEL_DIRS=DSA PoolAllocate
+PARALLEL_DIRS=DSA
include $(LEVEL)/Makefile.common
More information about the llvm-commits
mailing list