This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch][rfc] Hookize SMALL_REGISTER_CLASSES, make SSE register classes not small
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicha <jh at suse dot cz>, Richard Guenther <rguenther at suse dot de>, Ian Lance Taylor <ian at airs dot com>
- Date: Tue, 9 Dec 2008 20:38:54 -0500
- Subject: Re: [patch][rfc] Hookize SMALL_REGISTER_CLASSES, make SSE register classes not small
- References: <571f6b510812091430i2fe373cct1788ead26e988d81@mail.gmail.com>
On Tue, Dec 09, 2008 at 11:30:58PM +0100, Steven Bosscher wrote:
> Hi,
>
> Attached is a patch to hookize the SMALL_REGISTER_CLASSES target
> macro. But the actual purpose of the few hours I've spent on this,
> was to make it possible to have SMALL_REGISTER_CLASSES be false for
> some register classes but not for all.
>
> In the current situation, SMALL_REGISTER_CLASSES is true or false, but
> targets are not black and white. For x86-64, I've noticed we often
> get better results with floating point code if I disable
> SMALL_REGISTER_CLASSES, but it also results in lots of trouble with
> INTEGRAL_MODE_P modes (similar to what happens if you enable
> scheduling for x86-64).
>
> With the patch, a target can choose to allow more optimizations when
> it has good reason to believe that registers in some machine modes
> will not be allocated to small register classes. I didn't test this
> with a recent trunk, but before the IRA merge this gave me a ~1.3%
> bonus (average) for the Fortran Polyhedron benchmarks.
>
> As with the code-size aware PRE patch, I'm looking for opinions on
> this approach. Does this look like a reasonable approach? Would it
> be useful for other targets? (I've now simply converted the existing
> SMALL_REGISTER_CLASSES definitions to hooks).
Back when I was at AMD, I often times thought about making
SMALL_REGISTER_CLASSES false for x86_64 bit (where you have more registers),
but I never got around to doing it.
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com