[LLVMdev] Pool Allocation and DSA (and: Re: DSA Question)
torvald at se.inf.tu-dresden.de
Sun Jun 21 03:53:19 PDT 2009
On Friday 19 June 2009 18:23:12 Patrick Alexander Simmons wrote:
> Torvald Riegel wrote:
> > On Thursday 11 June 2009 18:14:08 John Criswell wrote:
> >> If your use of pool allocation requires that you can always get the pool
> >> handle for a pointer, you need to make sure that pool allocation is
> >> configured so that it doesn't generate the above scenario. I think
> >> there is an option to make all pools be global pools.
> > Some time ago, I used AnalysisUsage's
> > addRequired<PoolAllocatePassAllPools>() to get this behavior. It didn't
> > make all pools global.
> > Torvald
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> Okay, thanks, Torvald. I assume this resulted in more pool descriptor
> arguments being passed; did you find this to hurt performance at all?
I needed all of them, so I didn't check whether it hurt performance. It will
also depend a lot on your target applications. PoolAlloc has some statistics
for the maximum number of pools per function IIRC.
> Once I have the local pool descriptor, it's occurred to me that what I
> basically need is the interprocedural use-def chain from a pool
> descriptor's Argument to the corresponding Values in the caller
> functions. Unfortunately, I looked in the class hierarchy and found
> that Argument is not a subclass of User. Still, perhaps someone has
> created an interprocedural def-use/use-def analysis pass for LLVM for
> some other purpose?
The call sites (call and invoke instrs) are the users of the functions and
supply the arguments. Several different pool instances might get passed to a
function. Top-Down and Bottom-Up DSA find these sets to some extend (in order
to unify the DS nodes and pools), but I think none of them guarantees to find a
complete unification. I guess looking at Bottom-Up DSA's code should be
More information about the llvm-dev