This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Function specific optimizations call for discussion
- From: "Michael Meissner" <michael dot meissner at amd dot com>
- To: "Sylvain Pion" <Sylvain dot Pion at sophia dot inria dot fr>
- Cc: gcc at gcc dot gnu dot org, "Michael Meissner" <michael dot meissner at amd dot com>, christophe dot harle at amd dot com
- Date: Thu, 29 Nov 2007 16:27:43 -0500
- Subject: Re: Function specific optimizations call for discussion
- References: <20071128205737.GA28277@mmeissner-gold.amd.com> <474EA97F.1050004@sophia.inria.fr>
On Thu, Nov 29, 2007 at 12:58:55PM +0100, Sylvain Pion wrote:
> Michael Meissner a écrit :
> >One of the things that I've been interested in is adding support to GCC to
> >compile individual functions with specific target options. I first
> >presented a
> >draft at the Google mini-summit, and then another draft at the GCC
> >developer
> >summit last July.
> >
> >In the x86 world this would mean saying that an individual function can use
> >SSE5 instructions or SSE4.1 instructions. This would simplify things for
> >people who need to write high performance libraries that run on different
> >architectures, and need to be optimal on each platform. Ultimately, the
> >goal
> >is to allow hotspot functions to be compiled several times with different
> >target specific optimizations. I would welcome any thoughts or suggestions
> >about this proposal.
>
> I'm wondering if this proposal would support specifying things
> like adding -frounding-math when compiling specific functions.
> ( This particular case is connected to pragma FENV_ACCESS though. )
I imagine it could be made to work once the infrastructure is in place. I had
forgotten about the C99 math pragmas.
> Also, would this work when the functions is inline?
> I mean the case when the caller does not have the same attribute,
> but the inlined code of the callee still respects the attribute
> set for the inlined callee.
Right now I specify that for stage 1 if a generic function calls a function
with target specific support, that it not be inlined. However a function with
target specific support can call and inline either generic functions or other
functions with the same target specific options.
--
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA
michael.meissner@amd.com