This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] SH: New define_split sh.md
- From: <tm_gccmail at kloo dot net>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: "Naveen Sharma, Noida" <naveens at noida dot hcltech dot com>,gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Oct 2003 17:08:45 -0700 (PDT)
- Subject: Re: [PATCH] SH: New define_split sh.md
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