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]

Re: LOG_LINKS in the gcc


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.


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