This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is there an attribute or pragma to disable optimization for a single function?
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: devang dot patel at gmail dot com (Devang Patel)
- Cc: nelsonis at earthlink dot net, gcc at gcc dot gnu dot org
- Date: Wed, 22 Feb 2006 14:54:20 -0500 (EST)
- Subject: Re: Is there an attribute or pragma to disable optimization for a single function?
>
> On 2/22/06, Mike Stump <mrs@apple.com> wrote:
> > On Feb 22, 2006, at 10:24 AM, Ian S. Nelson wrote:
> > > It looks like there are attributes to help optimize some functions
> > > further but are there any to not optimize at all?
> >
> > In general, no; however, Dale did up a patch to control this sort of
> > thing from #pragma if you want to dust it off and adapt it for your
> > needs (and submit it).
>
> Just to avoid confusion...
>
> GCC distributed and maintained by FSF volunteers (aka official GCC)
> does not have this support. However, this support is available in a
> development branch used and maintained by Apple. As expected and just
> like any other vender branch, this development branch is tested and
> maintained for Apple platforms.
>
> If you're a compiler developer OR ready to spend time to add this
> feature in GCC yourself then take a look at this implementation and
> make it suitable for official GCC.
Just a note from the person who keeps tabs on a lot of stuff. There
is already a project which is written or started to write to do this.
See http://gcc.gnu.org/wiki/Function%20Level%20Control%20of%20Optimizations.
Thanks,
Andrew Pinski