This is the mail archive of the gcc-patches@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] |
> > > On Wed, Sep 03, 2003 at 01:56:26PM +0530, Sanjiv Kumar Gupta, > > > Noida wrote: > > > > The overall idea is to keep count of SImode and SFmode regs > > > required by > > > > already scheduled insns. > > > > > > I don't think this should at all be done via magic hooks in > > > the sh backend. > > > > The heuristics are pretty target specific. Do you think, > > I should change the generic scheduler for this? > > > I think Richard is right. You could make it more general (register > pressure calculation and reordering ready queue) because it could be > profitable for other ports (like arm or sparc) too. Then the most of > code could be in the scheduler itself. And may be one hook > to switch on (off) the heuristic for ports which could have benefit from this > heuristic. If there is no harm from this for all ports, the > hook could be removed. The attached patch makes register pressure calculation for SFmode/SImodes in generic scheduler. A new target hook is added to use the code. The hook lets a target define when insn movement needs to be throttled. It can see the how many SImode/SFModes regs are in use in current schedule and returns non-zero, in case, ready_queue is to be reordered based on register pressure.More modes might be added later if needed. In case of SH, r0 needs special consideration. This is accomodated in sh_track_register_pressure. I have tested this for sh. Also bootstraped/regtested on ia64. Let me know if it helps other targets. One more point, the change in gcc/flow.c is a workaround I mentioned in Regards, --sanjiv.
Attachment:
ISP1_20031111.txt
Description: Text document
Attachment:
flow_chnge.txt
Description: Text document
Attachment:
ChangeLog.ISP1
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |