public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RCSP and modulo scheduling
@ 2003-01-06 23:10 David Edelsohn
  2003-01-07  0:10 ` Vladimir Makarov
  0 siblings, 1 reply; 4+ messages in thread
From: David Edelsohn @ 2003-01-06 23:10 UTC (permalink / raw)
  To: Vladimir Makarov; +Cc: gcc

	Is RCSP suppose to be a complete solution for software pipelining
or used in conjunction with modulo scheduling?  The GCC IA-64 Wish List
and GCC IA-64 Summit both seem to imply that RCSP is a fallback when
modulo scheduling cannot be applied.  Should both be implemented and work
together for a complete solution?

Thanks, David

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

* Re: RCSP and modulo scheduling
  2003-01-06 23:10 RCSP and modulo scheduling David Edelsohn
@ 2003-01-07  0:10 ` Vladimir Makarov
  2003-01-07 19:33   ` Jim Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Makarov @ 2003-01-07  0:10 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

David Edelsohn wrote:
> 
>         Is RCSP suppose to be a complete solution for software pipelining
> or used in conjunction with modulo scheduling?  The GCC IA-64 Wish List
> and GCC IA-64 Summit both seem to imply that RCSP is a fallback when
> modulo scheduling cannot be applied.  Should both be implemented and work
> together for a complete solution?

  I can not decide it alone.  I'd prefer to have only RCSP because
existing RCSP and modulo scheduling in one compiler is not reasonable
because of the code duplication.  I don't know industrial compilers
which implement several software pipelining (or insn scheduling)
methods.   It is too complicated optimization whose effect for the most
programs is negligible.

  I think about possibility to force RCSP work as modulo scheduling for
loops without if-constructions.  But I am not sure I'll be successful
(especial problem is usage of implementation of register rotation).  In
any case it will be not soon.  RCSP also works slower than modulo
scheduling.

  So may be there is a sense to use modulo scheduling for loops without
internal branches and RCSP for loops with them as a temporary solution
(although all temporary solutions aim to be permanent ones).  It would
be definitely worth to do it if we already had modulo scheduling.

Vlad

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

* Re: RCSP and modulo scheduling
  2003-01-07  0:10 ` Vladimir Makarov
@ 2003-01-07 19:33   ` Jim Wilson
  2003-01-07 20:17     ` Vladimir N. Makarov
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Wilson @ 2003-01-07 19:33 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Vladimir Makarov, gcc

>         Is RCSP suppose to be a complete solution for software pipelining
> or used in conjunction with modulo scheduling?  The GCC IA-64 Wish List
> and GCC IA-64 Summit both seem to imply that RCSP is a fallback when
> modulo scheduling cannot be applied.  Should both be implemented and work
> together for a complete solution?

IA-64 has hardware register rotation which is supported by modulo scheduling
but not RCSP.

RCSP can handle loops containing if statements better than modulo scheduling.
IA-64 has relatively cheap predication support that lets us eliminate if
statements thus allowing modulo scheduling to succeed more often.

There are also a number of other issues to consider, but the main point here
is that the IA-64 architecture was designed assuming the compiler would support
modulo scheduling.  So modulo scheduling is clearly the best choice for an
IA-64 target, but is not necessarily the best choice for other targets.

As for which one is right for gcc, that issue has not been decided yet, and
may not be decided for a long time.

There was a previous thread that discussed some of the issues here.
See for instance...
        http://gcc.gnu.org/ml/gcc/2002-09/msg01263.html

Jim

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

* Re: RCSP and modulo scheduling
  2003-01-07 19:33   ` Jim Wilson
@ 2003-01-07 20:17     ` Vladimir N. Makarov
  0 siblings, 0 replies; 4+ messages in thread
From: Vladimir N. Makarov @ 2003-01-07 20:17 UTC (permalink / raw)
  To: Jim Wilson; +Cc: David Edelsohn, gcc

Jim Wilson wrote:

> >         Is RCSP suppose to be a complete solution for software pipelining
> > or used in conjunction with modulo scheduling?  The GCC IA-64 Wish List
> > and GCC IA-64 Summit both seem to imply that RCSP is a fallback when
> > modulo scheduling cannot be applied.  Should both be implemented and work
> > together for a complete solution?
>
> There was a previous thread that discussed some of the issues here.
> See for instance...
>         http://gcc.gnu.org/ml/gcc/2002-09/msg01263.html
>
>

Just one addition for the message mentioned by Jim:

"  Machine independent implementation of modulo scheduling requires to
use the old or DFA pipeline description.  Unfortunately, the DFA
pipeline hazard recognizer is not good enough to support modulo
scheduling (it needs more interface functions).  But the support could
be provided."

DFA pipeline hazard recognizer could be easily used for modulo scheduling without
the additional support.

To implement modulo scheduling we need to make a union of the state after
instruction issue and the states gotten from the it by advancing the simulated
processor cycle by II * n, where II is the initiation interval and n is 1, 2, 3
and so on.  N could be constrained by a value which results in the state
designating no functional unit reservations.  Actually, we could implement the
union of states as simply a set of the states.  It could be a part of module
scheduling not the pipeline hazard recognizer interface.

It is easy although usually recognizing pipeline hazards for software pipelining
(reservation tables are usually used there) is more complicated than the same
thing for insn scheduling.

Vlad


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

end of thread, other threads:[~2003-01-07 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-06 23:10 RCSP and modulo scheduling David Edelsohn
2003-01-07  0:10 ` Vladimir Makarov
2003-01-07 19:33   ` Jim Wilson
2003-01-07 20:17     ` Vladimir N. Makarov

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