[llvm-commits] [poolalloc] r96632 - in /poolalloc/trunk: include/rPA/ include/rPA/PoolAllocate.h lib/Makefile lib/PoolAllocate/ lib/PoolAllocate/PoolAllocate.cpp lib/PoolAllocate/TransformFunctionBody.cpp lib/rDSA/ tools/Makefile
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Thu Feb 18 16:12:50 PST 2010
Author: alenhar2
Date: Thu Feb 18 18:12:39 2010
New Revision: 96632
URL: http://llvm.org/viewvc/llvm-project?rev=96632&view=rev
Log:
clear out my old cruft (rDSA and rPA)
Added:
poolalloc/trunk/include/rPA/
- copied from r81344, poolalloc/trunk/include/poolalloc/
Removed:
poolalloc/trunk/lib/rDSA/
Modified:
poolalloc/trunk/include/rPA/PoolAllocate.h
poolalloc/trunk/lib/Makefile
poolalloc/trunk/lib/PoolAllocate/ (props changed)
poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
poolalloc/trunk/tools/Makefile
Modified: poolalloc/trunk/include/rPA/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/rPA/PoolAllocate.h?rev=96632&r1=81344&r2=96632&view=diff
==============================================================================
--- poolalloc/trunk/include/rPA/PoolAllocate.h (original)
+++ poolalloc/trunk/include/rPA/PoolAllocate.h Thu Feb 18 18:12:39 2010
@@ -28,7 +28,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/CommandLine.h"
-#include "dsa/DataStructure.h"
+#include "rdsa/DataStructure.h"
#include "poolalloc/ADT/HashExtras.h"
#include "poolalloc/Config/config.h"
@@ -134,11 +134,11 @@
virtual const Type * getPoolType() {return 0;}
virtual bool hasDSGraph (const Function & F) const {
- return Graphs->hasDSGraph (F);
+ return Graphs->hasDSGraph (&F);
}
virtual DSGraph* getDSGraph (const Function & F) const {
- return Graphs->getDSGraph (F);
+ return Graphs->getDSGraph (&F);
}
virtual DSGraph* getGlobalsGraph () const {
@@ -149,8 +149,8 @@
virtual Value * getGlobalPool (const DSNode * Node) {return 0;}
- virtual DataStructures::callee_iterator callee_begin (Instruction *I) { return Graphs->callee_begin(I);}
- virtual DataStructures::callee_iterator callee_end (Instruction *I) { return Graphs->callee_end(I);}
+ virtual InstCallGraph::iterator callee_begin (Instruction *I) { return Graphs->callee.begin(I);}
+ virtual InstCallGraph::iterator callee_end (Instruction *I) { return Graphs->callee.end(I);}
};
/// PoolAllocate - The main pool allocation pass
@@ -283,7 +283,7 @@
}
virtual DSGraph* getDSGraph (const Function & F) const {
- return Graphs->getDSGraph (F);
+ return Graphs->getDSGraph (&F);
}
virtual DSGraph* getGlobalsGraph () const {
@@ -367,14 +367,14 @@
return I->second;
}
- virtual DataStructures::callee_iterator
+ virtual InstCallGraph::iterator
callee_begin (Instruction * I) {
- return Graphs->callee_begin(I);
+ return Graphs->callee.begin(I);
}
- virtual DataStructures::callee_iterator
+ virtual InstCallGraph::iterator
callee_end (Instruction * I) {
- return Graphs->callee_end(I);
+ return Graphs->callee.end(I);
}
protected:
Modified: poolalloc/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/Makefile?rev=96632&r1=96631&r2=96632&view=diff
==============================================================================
--- poolalloc/trunk/lib/Makefile (original)
+++ poolalloc/trunk/lib/Makefile Thu Feb 18 18:12:39 2010
@@ -6,6 +6,6 @@
#
# List all of the subdirectories that we will compile.
#
-DIRS=DSA PoolAllocate AssistDS rDSA
+DIRS=DSA PoolAllocate AssistDS
include $(LEVEL)/Makefile.common
Propchange: poolalloc/trunk/lib/PoolAllocate/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Feb 18 18:12:39 2010
@@ -0,0 +1 @@
+.dep.inc
Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=96632&r1=96631&r2=96632&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Thu Feb 18 18:12:39 2010
@@ -48,13 +48,6 @@
cl::opt<bool> PA::PA_SAFECODE("pa-safecode", cl::ReallyHidden);
-#if 0
-#define TIME_REGION(VARNAME, DESC) \
- NamedRegionTimer VARNAME(DESC)
-#else
-#define TIME_REGION(VARNAME, DESC)
-#endif
-
namespace {
RegisterPass<PoolAllocate>
X("poolalloc", "Pool allocate disjoint data structures");
@@ -151,7 +144,6 @@
// program, don't traverse newly added ones. If the function needs new
// arguments, make its clone.
std::set<Function*> ClonedFunctions;
-{TIME_REGION(X, "MakeFunctionClone");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && !ClonedFunctions.count(I) &&
Graphs->hasDSGraph(*I))
@@ -159,18 +151,15 @@
FuncMap[I] = Clone;
ClonedFunctions.insert(Clone);
}
-}
// Now that all call targets are available, rewrite the function bodies of the
// clones.
-{TIME_REGION(X, "ProcessFunctionBody");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration() && !ClonedFunctions.count(I) &&
Graphs->hasDSGraph(*I)) {
std::map<Function*, Function*>::iterator FI = FuncMap.find(I);
ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I);
}
-}
//
// Replace any remaining uses of original functions with the transformed
@@ -488,9 +477,7 @@
// Perform the cloning.
std::vector<ReturnInst*> Returns;
-{TIME_REGION(X, "CloneFunctionInto");
CloneFunctionInto(New, &F, ValueMap, Returns);
-}
//
// The CloneFunctionInto() function will copy the parameter attributes
@@ -656,7 +643,6 @@
std::map<const DSNode*,
Value*> &PoolDescriptors) {
if (NodesToPA.empty()) return;
- TIME_REGION(X, "CreatePools");
std::vector<Heuristic::OnePool> ResultPools;
CurHeuristic->AssignToPools(NodesToPA, &F, NodesToPA[0]->getParentGraph(),
Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=96632&r1=96631&r2=96632&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Thu Feb 18 18:12:39 2010
@@ -793,7 +793,7 @@
}
}
- std::string Name = TheCall->getName(); TheCall->setName("");
+ std::string Name = TheCall->getName(); TheCall->setName("");
if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall)) {
NewCall = InvokeInst::Create (NewCallee, II->getNormalDest(),
Modified: poolalloc/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/tools/Makefile?rev=96632&r1=96631&r2=96632&view=diff
==============================================================================
--- poolalloc/trunk/tools/Makefile (original)
+++ poolalloc/trunk/tools/Makefile Thu Feb 18 18:12:39 2010
@@ -6,6 +6,6 @@
#
# List all of the subdirectories that we will compile.
#
-PARALLEL_DIRS=Pa
+PARALLEL_DIRS= #Pa
include $(LEVEL)/Makefile.common
More information about the llvm-commits
mailing list