[PATCH] more PR33928: DIY dataflow in fwprop, to enable it at -O1 and speed it up at -O2

Paolo Bonzini bonzini@gnu.org
Fri May 8 15:39:00 GMT 2009


Kenneth Zadeck wrote:
> Paolo Bonzini wrote:
>>> 1) I think that this should have been packaged as a new dataflow problem
>>> so that it could have been used by others.
>>>     
>> For the record, the way to go is to not use rd at all, after which I'd
>> say it's correct to make a new dataflow problem.
>>
>> Paolo
>>
>>   
> So how would you do it, I assume that you are not planning to do the
> trick of only looking at regs that have a single def.

Seed SINGLE_DEF_in with nothing and SINGLE_DEF_out with the last def in
a basic block.

Define MANY_DEFS_kill as the defs in the basic block.

The transfer function is just MANY_DEFS_out = MANY_DEFS_in \ MANY_DEFS_kill.

The confluence function ORs all the incoming MANY_DEFS_in, plus it sets
MANY_DEFS_in whenever two SINGLE_DEF_outs conflict, else it sets
SINGLE_DEF_in to the common SINGLE_DEF_out.  All I have to figure out is
a good representation for SINGLE_DEF.

Paolo



More information about the Gcc-patches mailing list