This is the mail archive of the gcc-bugs@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: SH4 SFmode move latency problem?


tm wrote:
> 
> On Mon, 11 Nov 2002, Joern Rennecke wrote:
> 
> > tm wrote:
> > > This is from CVS head.
> >
> > Then indeed a zero latency is specified for sh4 (using ls_group).
> >
> > Can you provide a test case?
> 
> It's layer3.i from stress-1.17 compiled with -O2 -m4 -ml.
> 
> I will send it in a separate message.

[This is using pipe_model "sh4"]

Indeed, it appears that the code is pessimized by this schedule.
We want to issue the first double precision multiply (muldi_i, type
dfp_arith in sh.md) as soon as possible, because it blocks the FPU
"F2" unit for the following multiplies for six cycles (starting in
cycle 3).
However, the 2 loads that feed the second multiply are scheduled
first, even though we need them to start just one cycle before the
second multiply (so that we can use the load_store slot of that
cycle in addition to the one simultanous to the issue of the second
multiply).

The comments in the scheduler seem to suggest that the problem is the
heuristic to perfer the longest dependency chain, which does not take
function unit conflicts into account.
I tried to define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD to
a function that returns 8, and later even 160, and removed *sched*.o
before rebuilding, but to no avail; the generated assembler is still
identical.

I don't think I can use any of the TARGET_SCHED_REORDER* macros,
since they don't have a documented interface to do look ahead.
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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