This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Enabling gcc optimization pass
- From: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- To: Rohit Arul Raj <rohitarulraj at gmail dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 26 Jul 2007 14:21:10 +0200
- Subject: Re: Enabling gcc optimization pass
- References: <c356fd4e0707260030n58a57e25ma9a7dba012274575@mail.gmail.com>
Rohit Arul Raj wrote:
Hi all,
I have 3 functions- fun1, fun2, fun3 in the same source file and i
want to enable one or any of the gcc optimization pass to code in fun2
only,
1. Is it possible to implement this using function attributes or #pragms's?
I believe that currently, tuning optimisation levels at a function granularity (or perhaps even smaller, like blocks) is
impossible in current GCC. I heard at the GCC summit (18th july 2007 at Ottawa) that it would be a desirable feature,
but I am not sure that someone is actively working on it.
So currently, the answer seems to be no.
I believe that currently, tuning optimisation levels at a function granularity (or perhaps even smaller, like blocks) is
impossible in current GCC. I heard at the GCC summit (18th july 2007 at Ottawa) that it would be a desirable feature,
but I am not sure that someone is actively working on it.
2. What will be its side-effects?
Apparently, one of the issues is that some optimising passes (or their combination) rely on some global variable, so it
is not a trivial job to tune optimisations at the function level.
But I may be wrong on both points.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net | mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***