[PATCH] Function specific optimization, part 3 of 4, documentation changes

Weddington, Eric eweddington@cso.atmel.com
Thu Jun 12 04:42:00 GMT 2008


> -----Original Message-----
> From: Michael Meissner [mailto:michael.meissner@amd.com] 
> Sent: Wednesday, June 11, 2008 3:36 PM
> To: gcc-patches@gcc.gnu.org; karthikkumar@gmail.com; 
> christophe.harle@amd.com; michael.meissner@amd.com
> Subject: Re: [PATCH] Function specific optimization, part 3 
> of 4, documentation changes
> 
> This patch is the change to the documentation:

Congratulations for finally getting this feature in!

<snip> 
> Index: gcc/doc/extend.texi
> ===================================================================
> --- gcc/doc/extend.texi	(revision 136675)
> +++ gcc/doc/extend.texi	(working copy)
> @@ -1792,6 +1792,7 @@ the enclosing block.
>  @cindex functions that are passed arguments in registers on the 386
>  @cindex functions that pop the argument stack on the 386
>  @cindex functions that do not pop the argument stack on the 386
> +@cindex functions that have different compilation options on the 386
>  
>  In GNU C, you declare certain things about functions called 
> in your program
>  which help the compiler optimize function calls and check 
> your code more
> @@ -2663,6 +2664,169 @@ with the notable exceptions of @code{qso
>  take function pointer arguments.  The @code{nothrow} attribute is not
>  implemented in GCC versions earlier than 3.3.
>  
> +@item option
> +@cindex @code{option} function attribute
> +The @code{option} attribute is used to specify that a function is to
> +be compiled with different options than specified on the 
> command line.
> +This can be used for instance to have functions compiled with a
> +different ISA (instruction set architecture) than the default.

At the last Summit (2007) we talked about being able to compile specific
functions with different optimization flags. I notice that these patches
so far only address compiling functions with different ISAs on x86. Will
the infrastructure that you and Karthik are putting in also allow
different optimization flags to be set? As I mentioned, the AVR
community is very interested in, e.g., compiling a unit with -Os but
specifying a single function to compile for -O3. What about turning
on/off different optimization -f and -m flags?

Thanks,
Eric Weddington



More information about the Gcc-patches mailing list