[LLVMdev] SSA virtuals -> Original variables
Andrew Lenharth
alenhar2 at uiuc.edu
Mon Jul 31 08:14:05 PDT 2006
On Sun, 2006-07-30 at 14:57 -0700, Fernando Magno Quintao Pereira wrote:
> Dear LLVM'ers,
>
> in my register allocator, sometimes I have to spill virtuals that
> represent the same variable before SSA conversion. I would like to
> assign the same stack slot to these virtuals. Is there a way to
> recover this information from one of LLVM data structures? In other
> words, is it possible to discover which virtuals represent the same
> variable before SSA conversion by reading one of LLVM data structures?
That information is lost. What I think you really want is an analysis
of the liveness of a stack slot so that you can find spills that don't
overlap and compact those to a single stack slot. At least, this is
something I would like to see to reduce stack usage. Trying to do this
based on "original variable" is not going to work as optimizations may
have done a lot of rearranging, including causing two values generated
from the original variable to be live at once.
Andrew
More information about the llvm-dev
mailing list