This is the mail archive of the gcc@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: local data flow


Joern RENNECKE wrote:
> Kenneth Zadeck wrote:
>
>>> I suppose reg-live-at-start / reg-live-at-end information is
>>> actually easier
>>> to maintain during if-conversion that def-use chains.    
>> This is true, certainly in theory, a lot less so in practice.
>> The way that you order things is this.
>> while (something changes and we have not done too many passes)
>>    do the analysis
>>    do one properly ordered pass over the cfg changing what you can
>> change without using information that has been corrupted during this
>> pass.
>>  
>>
> Except that with the current def-use chains updating def-use chains is
> pointless since they
> don't have the required information in the first place.
>>> In my problem, the gen set is the set of uses, and the kill set are
>>> defs, clobbers and uses.  Hence, it's still backwards problem.    
>> You could define it either way.  However, the backwards problem is
>> already there in both the mainline and the dataflow branch.  It is
>> called reaching uses or DF_RU.
>>  
>>
> When the block has one or more uses, but no def of a register, the
> question
> to ask is 'which uses of this register reaches this *use* site'
> (backwards).  That's
> different from DF_RU, which calculates this information for def sites
> instead.
>
>>  I think you should look closely are DF_RU.
>
> What more is there to see?  When the block I'm looking at only has
> uses of a
> register, I don't want to know about uses in 'siblings' in the control
> flow graph -
> what I want to know is if the register is live at the end of the
> block.  LR should
> answer that, and I can keep this information up-to-date inasmuch as it
> will
> mention all live registers, and remain self-consistent.
>
Jorne, I do not know what problem you want to solve.  You have never
given me or I think anyone else a succinct description of exactly what
you want to do here.

What you did say that you needed was "No, I want to know if there exists
a path from the current *use* of a register to some other *use* of the
same register without going through a def. "

>From that description I assumed that you really did care which uses
actually reached which other uses.  The reaching uses problem tracks
each use separately.  If this isn't what you need then you are free to
use LR which is certainly much cheaper than RU.


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