Hi,

On Mon, 30 May 2011, Alexandre Oliva wrote:

> > 3. expand dominators before dominated blocks, so that DEFs of 
> >    replaceable SSA names are expanded before their uses.  Expand them 
> >    when they're encountered, but not requiring a REG as a result.  
> >    Save the RTL expression that results from the expansion for use in 
> >    debug insns and at the non-debug use.
> 
> This patch addresses some of the problems in 2, avoiding expanding code 
> out of order within a block, and (hopefully) ensuring that, expanding 
> dominators before dominatedblocks, DEFs are expanded before USEs.  

That isn't necessary.  Replaceable SSA_NAMEs are defined in the same BB as 
their use, and hence they're expanded strictly before their use already 
right now.

> There is a theoretical possibility that a USE may be expanded before a 
> DEF, depending on internal details of out-of-ssa,

This can only happen with non-replaceable SSA_NAMEs and I thought you wish 
to deal only with replaceable.

That said, I dislike approach 2 for the same worries you noted.  And with 
the above I don't see why your approach (3) isn't workable without changes 
to the BB order, which should then be a really small patch.  As SSA_NAMEs 
are (fairly) dense it might be better to simply use an array instead of a 
pointer_map for the SSA_NAME->rtx mapping.


Ciao,
Michael.

Reply via email to