Re: Mapping back to original variables after SSA optimizations

2008-04-14 Thread Diego Novillo

On 4/10/08 8:16 AM, Fran Baena wrote:

Hi all,

i have a doubt about unSSA: is it allways possible to map back the
versioned variables to the original variable? If it could be possible,
is there an algorithm that describe this translation back?


It is not always possible.  If there are overlapping live ranges for two 
names of the same symbol, two different symbols need to be created. 
That's the reason why we do not allow overlapping live-ranges on memory 
variables.


Memory variables are not put in standard SSA form.  We build FUD 
(factored use-def) chains for those.  See Wolfe's book High performance 
compilers for parallel computing for details.




I have read the paper Efficiently computing static single assignment
form and the control dependence graph (cytron91) and no way to
translate back from SSA is explained, it only points out that after
SSA optimizations dead code elminitation and allocation by
colloring are recommended to be performed.


The out-of-SSA pass was modeled after the algorithm in Robert Morgan's 
book Building an Optimizing Compiler.



Diego.


Mapping back to original variables after SSA optimizations

2008-04-10 Thread Fran Baena
Hi all,

i have a doubt about unSSA: is it allways possible to map back the
versioned variables to the original variable? If it could be possible,
is there an algorithm that describe this translation back?
I have read the paper Efficiently computing static single assignment
form and the control dependence graph (cytron91) and no way to
translate back from SSA is explained, it only points out that after
SSA optimizations dead code elminitation and allocation by
colloring are recommended to be performed.

Thanks

Fran