* question about scheduling optimization in machine description
@ 2004-09-10 1:28 Spundun Bhatt
2004-09-10 6:38 ` Richard Henderson
2004-09-10 10:37 ` Paolo Bonzini
0 siblings, 2 replies; 5+ messages in thread
From: Spundun Bhatt @ 2004-09-10 1:28 UTC (permalink / raw)
To: gcc
Hi all..
I have a couple of problems with my target which I have been ffighting
with for a few months now, so I have decided to try here. In this email
I am writing about on of them. It will be great if someone can suggest a
way out of it.. if not.. a pointer to a simlar implementation in any of
the existing target would be great.
On my architecture, floating point instructions run faster when put
backto back with no integer or load/store instructions in the middle.
So I want to ask the compiler to group as many such instructions
togather as possible. The reason is that FP unit is pipelined and it
stalls all instructions except other floating point instructions until
the float pipeline is clear. (to save on WB hazard detection).
I have thought about this a lot but ccant find a solution that will be
helpful... any ideas? or has it been done for some target for certain
instructions?
Thanx
Spundun
--
If popularity breeds vulnerability, Apache should have far more vulnerabilities than IIS. It doesn't.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about scheduling optimization in machine description
2004-09-10 1:28 question about scheduling optimization in machine description Spundun Bhatt
@ 2004-09-10 6:38 ` Richard Henderson
2004-09-11 17:20 ` Spundun Bhatt
2004-09-10 10:37 ` Paolo Bonzini
1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2004-09-10 6:38 UTC (permalink / raw)
To: Spundun Bhatt; +Cc: gcc
On Thu, Sep 09, 2004 at 05:38:17PM -0700, Spundun Bhatt wrote:
> On my architecture, floating point instructions run faster when put
> backto back with no integer or load/store instructions in the middle.
> So I want to ask the compiler to group as many such instructions
> togather as possible. The reason is that FP unit is pipelined and it
> stalls all instructions except other floating point instructions until
> the float pipeline is clear. (to save on WB hazard detection).
>
> I have thought about this a lot but ccant find a solution that will be
> helpful... any ideas?
You may be able to do clever things with the scheduling DFA.
We do instruction bundling for pentiumpro this way, for instance.
Also examine the TARGET_SCHED_REORDER target hook. That'll
let you choose from the ready instructions to fill just
about any packing scheme you need. You'll have to track
the instruction state yourself in that case; there are other
hooks to enable that.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about scheduling optimization in machine description
2004-09-10 1:28 question about scheduling optimization in machine description Spundun Bhatt
2004-09-10 6:38 ` Richard Henderson
@ 2004-09-10 10:37 ` Paolo Bonzini
1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2004-09-10 10:37 UTC (permalink / raw)
To: Spundun Bhatt, gcc
> On my architecture, floating point instructions run faster when put
> backto back with no integer or load/store instructions in the middle.
> So I want to ask the compiler to group as many such instructions
> togather as possible. The reason is that FP unit is pipelined and it
> stalls all instructions except other floating point instructions until
> the float pipeline is clear. (to save on WB hazard detection).
You should already have (in your scheduling description) a unit for each
fp pipeline stage, e.g. fp1, fp2, fp3, fp4, fp5.
FP instructions have normal reservations, something like
fp1,fp2,fp3,fp4,fp5 for example.
Other instructions, in addition to what they really reserve, keep all of
the FP units busy on their first cycle, like (alu+fp1+fp2+fp3+fp4+fp5).
^^^^^^^^^^^^^^^^^^^^
I'm not sure it works, but "on paper" it looks like it should.
For a very simple close-to-trivial scheduling description, see the ARC
port. Another possibility can be the frv.md file, or sh4.md file in
config/sh.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about scheduling optimization in machine description
2004-09-10 6:38 ` Richard Henderson
@ 2004-09-11 17:20 ` Spundun Bhatt
2004-09-11 17:24 ` Richard Henderson
0 siblings, 1 reply; 5+ messages in thread
From: Spundun Bhatt @ 2004-09-11 17:20 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc, bonzini
Richard Henderson wrote:
>On Thu, Sep 09, 2004 at 05:38:17PM -0700, Spundun Bhatt wrote:
>
>
>>On my architecture, floating point instructions run faster when put
>>backto back with no integer or load/store instructions in the middle.
>>So I want to ask the compiler to group as many such instructions
>>togather as possible. The reason is that FP unit is pipelined and it
>>stalls all instructions except other floating point instructions until
>>the float pipeline is clear. (to save on WB hazard detection).
>>
>>I have thought about this a lot but ccant find a solution that will be
>>helpful... any ideas?
>>
>>
>
>You may be able to do clever things with the scheduling DFA.
>We do instruction bundling for pentiumpro this way, for instance.
>
>
Thanks to you a Paolo for the reply.
Unfortunately I omitted an important detail in my problem. The fact that
I am working on a gcc derived from 2.95.3 :((. I studied the new and old
internals book... and came to conclusion that both your replies refer to
the new scheduling method that is not available in 2.95.3. Sorry for not
mentioning this before. Is there anyway to do this in the 2.95.3 scheduler?
Thank you
Spundun
btw. I am considering just putting the old target directory in the new
gcc 3.4 's config directory .... do you think that can work? (within a
day or a week?)
>Also examine the TARGET_SCHED_REORDER target hook. That'll
>let you choose from the ready instructions to fill just
>about any packing scheme you need. You'll have to track
>the instruction state yourself in that case; there are other
>hooks to enable that.
>
>
>
>r~
>
>
>
--
If popularity breeds vulnerability, Apache should have far more
vulnerabilities than IIS. It doesn't.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about scheduling optimization in machine description
2004-09-11 17:20 ` Spundun Bhatt
@ 2004-09-11 17:24 ` Richard Henderson
0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2004-09-11 17:24 UTC (permalink / raw)
To: Spundun Bhatt; +Cc: gcc, bonzini
On Sat, Sep 11, 2004 at 10:00:51AM -0700, Spundun Bhatt wrote:
> Is there anyway to do this in the 2.95.3 scheduler?
Probably not.
> btw. I am considering just putting the old target directory in the new
> gcc 3.4 's config directory .... do you think that can work? (within a
> day or a week?)
Within a week, perhaps.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-11 17:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-10 1:28 question about scheduling optimization in machine description Spundun Bhatt
2004-09-10 6:38 ` Richard Henderson
2004-09-11 17:20 ` Spundun Bhatt
2004-09-11 17:24 ` Richard Henderson
2004-09-10 10:37 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).