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: sched2, ret, use, and VLIW bundling


DJ Delorie wrote:
I'm working on a VLIW coprocessor for MeP.  One thing I noticed is
that sched2 won't bundle the function's RET with the insn that sets
the return value register, apparently because there's an intervening
USE of that register (insn 30 in the example below).

Is there any way around this?  The return value obviously isn't
actually used there, nor does the return insn need it - that USE is
just to keep the return value live until the function exits.

The problem may be in the dependency cost between the SET (insn 27) and the USE (insn 30) being >= 1. Have you tried using targetm.sched.adjust_cost() hook to set the cost of USE to 0?


Anyway, this seems strange, the scheduler should just output the USEs as soon as they are ready. One of the few places this can be forced untrue is targetm.sched.dfa_new_cycle() hook; does your port define it?

--
Maxim


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