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: How will scheduler take care of modulo scheduling?


Ritu Sabharwal wrote:
> 
> Hi,
>   Please give mne the details of how to modify the existing scheduler to
> incorporate the modulo scheduler. Will thus checking of loop start and
> loop end work fine? Does we nned to consider any timing  constraints for
> this?
>   Modulo Scheduler is completed but please tell me the right way of
> integrating this with the insn scheduler.
> 

It depends on where you are going to run modulo scheduling (on the 1st
or 2nd insn scheduling).

IMHO, the right approach is to make it on the 2nd insn scheduling
because the compiler could have more accurate information about insns
(because of the insn splitting).  On the other hand, making software
pipelining there requires to implement (partial) register renaming
because the register allocator creates new dependencies and
possibilities to get a better software pipelining are lost.

By the way RCSP and new version of haifa-scheduler (that what I read)
makes software pipelining on the 1st insn scheduling because it is easy
to do there.

So if you do it on the 1st insn scheduling, the haifa-scheduler (on the
1st phase) finds loops and uses them as regions for insn scheduler.  You
could call software pipelining instead of insn scheduler for such
region.  Please see the code in sched-rgn.c.  That is the way how RCSP
and the new haifa scheduler works.

If you do it on the 2nd insn scheduling, you could just check loop start
and loop finish and call insn scheduling only for blocks which are not
in the loops (haifa insn scheduler works only with the basic blocks not
regions on the 2nd insn scheduling).

In any case your modulo scheduling should be machine-independent code
parameterized by processor pipeline description.  Otherwise, I doubts
that the code will be accepted for gcc.

Also it is good idea to make a branch and place the code on the branch. 
Then people could look at this code and comment it.  I think it will be
not easy process if the code was written outside gcc because the
integration of a code written outside gcc is not easy process: gcc has
own style, standards, infrastructure.  For example, integration of
haifa-scheduler (donated by IBM) was not easy process and still not
finished (and on my opinion efforts for this was comparable with writing
a new scheduler from the scratch).

Vlad


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