public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question about the difference between two instruction scheduling   passes
@ 2009-08-19 22:51 Amker.Cheng
  2009-08-19 23:26 ` Ian Lance Taylor
  2009-08-19 23:47 ` Alex Turjan
  0 siblings, 2 replies; 3+ messages in thread
From: Amker.Cheng @ 2009-08-19 22:51 UTC (permalink / raw)
  To: gcc

Hi all:
   I'm currently studying implementation of instruction sched in gcc.

it is possible to schedule insns directly from queue in case
there is nothing better to do and there are still vacant dispatch slots
in the current cycle.

Gcc only does this work in the second pass, but what's the point?
Is it wrong or just not necessary  in the first sched pass?

Thanks.
-- 
Best Regards.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about the difference between two instruction scheduling   passes
  2009-08-19 22:51 Question about the difference between two instruction scheduling passes Amker.Cheng
@ 2009-08-19 23:26 ` Ian Lance Taylor
  2009-08-19 23:47 ` Alex Turjan
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2009-08-19 23:26 UTC (permalink / raw)
  To: Amker.Cheng; +Cc: gcc

"Amker.Cheng" <amker.cheng@gmail.com> writes:

>    I'm currently studying implementation of instruction sched in gcc.
>
> it is possible to schedule insns directly from queue in case
> there is nothing better to do and there are still vacant dispatch slots
> in the current cycle.
>
> Gcc only does this work in the second pass, but what's the point?
> Is it wrong or just not necessary  in the first sched pass?

The first scheduling pass runs before register allocation and reload so
it's going to get generally trashed anyhow.  There no point to being
very precise in the first pass, it's just a rough approximation.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about the difference between two instruction scheduling   passes
  2009-08-19 22:51 Question about the difference between two instruction scheduling passes Amker.Cheng
  2009-08-19 23:26 ` Ian Lance Taylor
@ 2009-08-19 23:47 ` Alex Turjan
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Turjan @ 2009-08-19 23:47 UTC (permalink / raw)
  To: gcc, Amker.Cheng

> Gcc only does this work in the second pass, but what's the
> point? Is it wrong or just not necessary  in the first sched
> pass?

Regardless of the target architecture from the correctness point of view sched1 can be disabled. sched1 has as purpose shortening live ranges.
Short live ranges allow the register allocation to:
1. generate less spills and 
2. also to avoid useless live ranges splitting. 

The second point impacts the register renaming phase which allows sched2 phase to extract more ilp.




      

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-19 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-19 22:51 Question about the difference between two instruction scheduling passes Amker.Cheng
2009-08-19 23:26 ` Ian Lance Taylor
2009-08-19 23:47 ` Alex Turjan

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).