Enabling gcc optimization pass
Basile STARYNKEVITCH
basile@starynkevitch.net
Thu Jul 26 12:21:00 GMT 2007
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} ***
More information about the Gcc
mailing list