This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR48866] three alternative fixes


On May 30, 2011, Michael Matz <matz@suse.de> wrote:

> 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.

Hmm...  You're obviously right.  I must have misinterpreted some other
failure, then.  Thanks, this enables some simplification to two of the
patches.

>> 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.

Yup.

> 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.

Yup.  I'll give that a try.

> 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.

Likewise.

Thanks!

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]