public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How does the register allocator supports modulo scheduled code?
@ 2002-12-23  8:39 ritu sabharwal
  2002-12-23  8:42 ` Jan Hubicka
  2002-12-23 17:43 ` Daniel Berlin
  0 siblings, 2 replies; 5+ messages in thread
From: ritu sabharwal @ 2002-12-23  8:39 UTC (permalink / raw)
  To: gcc



Hello,
    We have done the modulo scheduling for the loops and added that to the 
gcc instruction scheduler. We have replaced the loop block with our 
scheduled code and it is working fine. But now when this is passed to the 
gcc register allocator, we are getting errors in reload pass. Will the gcc 
register allocator can not handle this modulo scheduled code?
Also we need to this modulo scheduling for IA64, so we need to do the 
predication for the modulo loop. Is there a way through which we can 
generate the predicate for these loop instructions i.e. how can we change 
the rtl format so that after generating the predicate it will keep that 
predicate in the rtl format and does the remainging gcc passes will support 
this predicated instructions?

Best,
Ritu.

_________________________________________________________________
MSN 8 with e-mail virus protection service: 3 months FREE*. 
http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&SU= 
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_eliminateviruses_3mf

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

* Re: How does the register allocator supports modulo scheduled code?
  2002-12-23  8:39 How does the register allocator supports modulo scheduled code? ritu sabharwal
@ 2002-12-23  8:42 ` Jan Hubicka
  2002-12-23  9:18   ` Andrew Haley
  2002-12-23 17:43 ` Daniel Berlin
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Hubicka @ 2002-12-23  8:42 UTC (permalink / raw)
  To: ritu sabharwal; +Cc: gcc

> 
> 
> Hello,
>    We have done the modulo scheduling for the loops and added that to the 
> gcc instruction scheduler. We have replaced the loop block with our 
> scheduled code and it is working fine. But now when this is passed to the 
> gcc register allocator, we are getting errors in reload pass. Will the gcc 
> register allocator can not handle this modulo scheduled code?

What kind of errors do you get exactly?  In case the insturctions you
produced match the constraints it should work just OK.  In case they
don't reload won't be able to fix up the hard registers.  One possible
trick is to do the same as new regalloc does - use pseudos one for each
hard register and manage register allocator to allocate these special
pseudos in the hard registers you want.  This is somewhat hackish
tought..

> Also we need to this modulo scheduling for IA64, so we need to do the 
> predication for the modulo loop. Is there a way through which we can 
> generate the predicate for these loop instructions i.e. how can we change 
> the rtl format so that after generating the predicate it will keep that 
> predicate in the rtl format and does the remainging gcc passes will support 
> this predicated instructions?

There is support for predicated instructions in RTL chain (see if
conversion pass implementation) but currently only few passes are
updated to deal with these.  Updating others is very desirable but may
be dificult so I think it should be done soeparately once you have
working modulo scheduling without this feature.

Honza
> 
> Best,
> Ritu.
> 
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 3 months FREE*. 
> http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&SU= 
> http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_eliminateviruses_3mf

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

* Re: How does the register allocator supports modulo scheduled code?
  2002-12-23  8:42 ` Jan Hubicka
@ 2002-12-23  9:18   ` Andrew Haley
  2002-12-23  9:25     ` Jan Hubicka
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2002-12-23  9:18 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: ritu sabharwal, gcc

Jan Hubicka writes:
 > > 
 > >    We have done the modulo scheduling for the loops and added that to the 
 > > gcc instruction scheduler. We have replaced the loop block with our 
 > > scheduled code and it is working fine. But now when this is passed to the 
 > > gcc register allocator, we are getting errors in reload pass. Will the gcc 
 > > register allocator can not handle this modulo scheduled code?
 > 
 > What kind of errors do you get exactly?  In case the insturctions you
 > produced match the constraints it should work just OK.  In case they
 > don't reload won't be able to fix up the hard registers.

Surely this can't work because reload will mess up the carefully
arranged schedule.

Andrew.

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

* Re: How does the register allocator supports modulo scheduled code?
  2002-12-23  9:18   ` Andrew Haley
@ 2002-12-23  9:25     ` Jan Hubicka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Hubicka @ 2002-12-23  9:25 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Jan Hubicka, ritu sabharwal, gcc

> Jan Hubicka writes:
>  > > 
>  > >    We have done the modulo scheduling for the loops and added that to the 
>  > > gcc instruction scheduler. We have replaced the loop block with our 
>  > > scheduled code and it is working fine. But now when this is passed to the 
>  > > gcc register allocator, we are getting errors in reload pass. Will the gcc 
>  > > register allocator can not handle this modulo scheduled code?
>  > 
>  > What kind of errors do you get exactly?  In case the insturctions you
>  > produced match the constraints it should work just OK.  In case they
>  > don't reload won't be able to fix up the hard registers.
> 
> Surely this can't work because reload will mess up the carefully
> arranged schedule.
In case you do the register allocation job, reload will do nothing, so
this can work.

Honza
> 
> Andrew.

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

* Re: How does the register allocator supports modulo scheduled code?
  2002-12-23  8:39 How does the register allocator supports modulo scheduled code? ritu sabharwal
  2002-12-23  8:42 ` Jan Hubicka
@ 2002-12-23 17:43 ` Daniel Berlin
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Berlin @ 2002-12-23 17:43 UTC (permalink / raw)
  To: ritu sabharwal; +Cc: gcc



On Mon, 23 Dec 2002, ritu sabharwal wrote:

>
>
> Hello,
>     We have done the modulo scheduling for the loops and added that to the
> gcc instruction scheduler.
> We have replaced the loop block with our
> scheduled code and it is working fine. But now when this is passed to the
> gcc register allocator, we are getting errors in reload pass. Will the gcc
> register allocator can not handle this modulo scheduled code?
Errr, we can't diagnose problems that only occur with your modulo
scheduling pass, without having your modulo scheduling pass.
People need to see and be able to work with the code, to determine if it's
reload's fault, your code's fault, or some combination of the two.
I would suggest you post your modulo schedulnig patch (even if it's rough)
if you want people to be able to help you.

--Dan

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

end of thread, other threads:[~2002-12-23 23:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23  8:39 How does the register allocator supports modulo scheduled code? ritu sabharwal
2002-12-23  8:42 ` Jan Hubicka
2002-12-23  9:18   ` Andrew Haley
2002-12-23  9:25     ` Jan Hubicka
2002-12-23 17:43 ` Daniel Berlin

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