This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc 3.1 performance regressions with respect to 2.95.3
- From: Dale Johannesen <dalej at apple dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, law at redhat dot com, Michael Matz <matzmich at cs dot tu-berlin dot de>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Mar 2002 15:50:51 -0800
- Subject: Re: Gcc 3.1 performance regressions with respect to 2.95.3
> The main affect on the scheduler moving the clobbers far away from
> the use/def sites is the issue rate. The bare clobbers are scheduled on
> unit -1 (no-unit). However, the scheduler is treating unit -1 as a real
> unit when applying the issue rate. ...
> IMHO, no-unit should not be counted against the issue rate and
> some other mechanism needs to keep those instructions from issuing early.
I noticed this a while back and asked; Richard Henderson replied that he
agreed it was wrong but had never done anything about it.
http://gcc.gnu.org/ml/gcc/2001-10/msg00362.html
So I haven't bothered submitting this, but it seems to work, although there
was no noticeable effect on generated code the last time I compared (long
ago,
before the problem you're trying to fix now was introduced, I think).
OTOH I'm not sure what the problem is that you refer to in the last line
above,
so there may be a problem with it I'm not aware of. My tree is out
of date so this is not exactly the right format, but the last line of
changes is what you want, I think.
haifa-sched.c
*** 1765,1779 ****
if (! (*current_sched_info->can_schedule_ready_p) (insn))
goto next;
! last_scheduled_insn = insn;
! last = move_insn (insn, last);
if (targetm.sched.variable_issue)
can_issue_more =
(*targetm.sched.variable_issue) (sched_dump, sched_verbose,
insn, can_issue_more);
! else if ( INSN_CODE (insn) >= 0 )
can_issue_more--;
schedule_insn (insn, &ready, clock_var);
--- 1758,1770 ----
if (! (*current_sched_info->can_schedule_ready_p) (insn))
goto next;
! last_scheduled_insn = move_insn (insn, last_scheduled_insn);
if (targetm.sched.variable_issue)
can_issue_more =
(*targetm.sched.variable_issue) (sched_dump, sched_verbose,
insn, can_issue_more);
! else
can_issue_more--;
schedule_insn (insn, &ready, clock_var);