This is the mail archive of the gcc@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: modulo scheduling for IA64


Jim Wilson wrote:
> 
> >       The GCC DFA scheduler already has a software-pipelining feature
> >which has not been merged into the FSF sources, but which should provide
> >modulo scheduling.  Why not complete that work?
> 
> Actually it is RCSP, Resource Constrained Software Pipelining.  It is a good
> algorithm, but unfortunately not the right one for IA-64 as I understand it.
> This is because RCSP doesn't support register rotation, and modulo scheduling
> does.  You need to use register rotation on IA-64 if you want the best
> performance, and thus modulo scheduling is better for IA-64.  RCSP may be
> better for all other targets though, since IA-64 is the only target with
> register rotation.

  Yes, Jim is right.  Register rotation is an unexplored field of RCSP. 
Although I don't see why register rotation can not be implemented in
RCSP.  RCSP is also can be forced to work as modulo pipelining.  But
implementation of register rotation in RCSP is more research work than
work for an industrial compiler.

  As for RCSP, I believe that it has the biggest potential.  My
experience shows me that although modulo scheduling is conceptually
simple, the rest of problems which should be resolved (dealing with ifs,
decreasing register pressure) complicates it too much and the result
algorithm is more complicated than perfect pipelining class algorithms
(as RCSP).  There is a big field in researches of RCSP and adapting
modern architectures to it (with register rotation).  It is much more
interesting than modulo scheduling whose research potential was
exhausted long ago.

  Also I look more widely at insns scheduling.  Software pipelining is
important for some scientific class algorithms, global insn
scheduling is more important.  With this point of view usage of RCSP is
more preferable because its algorithm core could be used for good global
(interblock) insns scheduling.  Its core is analogous to percolation
scheduling or Intel's wavefront scheduling.  So I'd think about software
pipelining as part of global scheduling e.g. as in selective scheduling
and pipelining in more recent version of haifa scheduler. 

  In any case, It is good to have more implementations of pipeling to
choose a better one. 

  Only one additional thought.  If modulo scheduling for ia64 is
implemented as machine dependent part (as I understood from the original
email), it will be wrong way.

  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.

Vlad


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