[PATCH] SH: New define_split sh.md

tm_gccmail@kloo.net tm_gccmail@kloo.net
Thu Oct 23 00:33:00 GMT 2003


On Wed, 22 Oct 2003, Joern Rennecke wrote:

> > The attached patch does a simple post-reload split
> > statements of the form
> > 
> >     mov #250, r1
> >     
> > to
> >     mov #125, r1
> >     shll r1
> > 
> > SH requires a pc-relative literal pool load for constant data 
> > more than 2 bytes long. To avoid it, we can synthesize the constant in
> > some cases by using a smaller constant and shift operation.
> > The rationale behind doing constant synthesis 
> > is that it would ease the pressure on LS unit 
> > by converting literal pool loads into  two EX group instructions.
> > This helps in better scheduling. So this should be a win.
> 
> I'm not so sure that this is a win.  The pressure on the EX unit is often
> higher than that on the LS unit.  Besides, you have two instructions
> where you had one before.

If you look at the benchmarks, it consistently results in a 3-5%
improvement, so I would prefer it to be merged.

Toshi




More information about the Gcc-patches mailing list