[llvm-commits] [poolalloc] r99297 - /poolalloc/trunk/include/poolalloc/PoolAllocate.h
John Criswell
criswell at uiuc.edu
Tue Mar 23 10:49:57 PDT 2010
Author: criswell
Date: Tue Mar 23 12:49:57 2010
New Revision: 99297
URL: http://llvm.org/viewvc/llvm-project?rev=99297&view=rev
Log:
Modified the PoolAllocateGroup class to inherit from ModulePass, eliminating
multiple inheritance in the PoolAllocate pass. This seems to fix a bizarre
error where calling the getGlobalsGraph() method invoked the releaseMemory()
method.
Modified:
poolalloc/trunk/include/poolalloc/PoolAllocate.h
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=99297&r1=99296&r2=99297&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Tue Mar 23 12:49:57 2010
@@ -107,7 +107,7 @@
} // end PA namespace
-class PoolAllocateGroup {
+class PoolAllocateGroup : public ModulePass {
protected:
DataStructures *Graphs;
const Type * VoidType;
@@ -125,7 +125,10 @@
enum PASS_TYPE {PASS_EQTD, PASS_BUEQ, PASS_DEFAULT};
PASS_TYPE dsa_pass_to_use;
+
+ PoolAllocateGroup (intptr_t IDp = (intptr_t) (&ID)) : ModulePass (IDp) { }
virtual ~PoolAllocateGroup () {return;}
+
virtual PA::FuncInfo *getFuncInfo(const Function &F) { return 0;}
virtual PA::FuncInfo *getFuncInfoOrClone(const Function &F) {return 0;}
virtual Function *getOrigFunctionFromClone(const Function *F) const {return 0;}
@@ -152,7 +155,7 @@
/// PoolAllocate - The main pool allocation pass
///
-class PoolAllocate : public ModulePass , public PoolAllocateGroup {
+class PoolAllocate : public PoolAllocateGroup {
/// PassAllArguments - If set to true, we should pass pool descriptor
/// arguments into any function that loads or stores to a pool, in addition to
/// those functions that allocate or deallocate. See also the
@@ -188,7 +191,7 @@
PoolAllocate (bool passAllArguments,
bool SAFECode = true,
intptr_t IDp = (intptr_t) (&ID))
- : ModulePass((intptr_t)IDp),
+ : PoolAllocateGroup ((intptr_t)IDp),
PassAllArguments(passAllArguments)
{
SAFECodeEnabled = BoundsChecksEnabled = SAFECode | PA::PA_SAFECODE;
@@ -202,7 +205,7 @@
bool passAllArguments = false,
bool SAFECode = true,
intptr_t IDp = (intptr_t) (&ID))
- : ModulePass((intptr_t)IDp),
+ : PoolAllocateGroup ((intptr_t)IDp),
PassAllArguments(passAllArguments)
{
SAFECodeEnabled = BoundsChecksEnabled = SAFECode | PA::PA_SAFECODE;
More information about the llvm-commits
mailing list