This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LOG_LINKS in the gcc
- To: Marcio de Oliveira Buss <ra990898 at ic dot unicamp dot br>
- Subject: Re: LOG_LINKS in the gcc
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Fri, 06 Oct 2000 12:16:33 +1300 (NZDT)
- Cc: gcc at gcc dot gnu dot org
- References: <Pine.GSO.4.10.10009272136301.1601-100000@pinheiros.dcc.unicamp.br>
Marcio de Oliveira Buss writes:
> I am trying to implement some sort of use-def chains in
> the gcc. Thus, I am looking for the data-dependencies between
> the instructions.
> I have found the LOG_LINKS, which tell me, for each reg
> being used in an instruction, where is the most recent instruction
> that defines that register WITHIN the same basic block (am I
> right?? )
Yes, this provides some limited use-def information. It only applies
to the first use following its def within the same basic block.
> But, and about the case when a definition of a "reg 1" is in
> the basic block 3, for instance, and its next use is in the block 5?
> The LOG_LINK of that instruction in the block 5 will not be pointed
> to its definition in the block 3, will be??
You're hosed here.
> Could someone help me by tell me how can I build the data-dependencies
> relationships?
regrename.c builds some def-use information but only for hard
registers after reload.
I have been intending to write some generic def-use and use-def
routines for use by the loop optimizer. The approach I had envisaged
was to build partial def-use and use-def chains for each basic block
(or perhaps for each extended basic block) and then to stitch them
together using life analysis information and a search of the CFG (or
possibly the reaching definition information computed in gcse.c).
Michael.