[LLVMdev] Pool Allocation and DSA

Patrick Alexander Simmons simmon12 at cs.uiuc.edu
Mon Jun 8 14:27:37 PDT 2009


I don't really have a specific question, but, as I've been looking 
through pool allocation and the DS graphs extensively, I wanted to 
verify that my understanding of the representations used is correct.  
Therefore, I'm summarizing my understanding below (which, if it's 
correct, may hopefully be helpful to others).  I would appreciate if 
someone who understands pool allocation well would comment on whether 
I'm right in my understanding.

After pool allocation runs, each Function is associated with a DS 
graph.  Each node in a Function's DS graph falls into one of the 
following categories:

1.  The node corresponds to a global pool.
2.  The node corresponds to a pool created by the Function.
3.  The node corresponds to a formal parameter passed to the function 
(and is the result of conservatively folding all possible actual 
parameters that may be passed to the function).
4.  The node corresponds to a pool parameter passed to the Function.
5.  The node is not in categories 1-4, in which case it must be pointed 
to by some other pool which either is in categories 1-4 or is pointed to 
by some other node, for which the same condition must hold.  That is to 
say, all nodes in the graph must be reachable by following the edges of 
the nodes in categories 1-4.

I'm guessing that the "getPool()" function in 
llvm-poolalloc/include/poolalloc/PoolAllocate.h will return NULL if the 
DSNode is in categories 3 or 5, will return a pointer to the Instruction 
that created the pool for category 2, will return a pointer to the 
global Value representing the pool for category 1, and will return a 
pointer to the pool's Argument for category 4 -- but those are really 
only guesses, and I'd very much appreciate confirmation that I guessed 
right :)

Thanks in advance for your help,
--Patrick



More information about the llvm-dev mailing list