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: Machine Dependent Reorganization Pass


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



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