Machine Dependent Reorganization Pass

Jim Wilson wilson@specifixinc.com
Thu Apr 29 12:02:00 GMT 2004


kernel_learner wrote:
> The other one is using the rtx of each instruction to
> see whether it's destination matches with any of the
> sources for the very next instruction.

There can be multiple destinations and sources.  You can find the 
destinations by using note_stores.  You can check to see if an insn uses 
a dest by calling reg_mentioned_p.

I was going to point you at an example that shows how to use note_stores 
in rtlanal.c, and then I noticed a function called insn_dependent_p that 
does this already.

You might need to change it a bit for your purposes, in case your 
targets idea of dependence does not match exactly what insn_dependent_p 
does.  For instance, there might be a disagreement on whether two loads 
to different addresses are dependent.  They are in you only have one 
load port, but they are not in the strict sense that insn_dependent_p uses.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list