This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Function specific optimization, part 3 of 4, documentation changes
- From: "Weddington, Eric" <eweddington at cso dot atmel dot com>
- To: "Michael Meissner" <michael dot meissner at amd dot com>, <gcc-patches at gcc dot gnu dot org>, <karthikkumar at gmail dot com>, <christophe dot harle at amd dot com>
- Cc: "Andy H" <hutchinsonandy at aim dot com>, "Joerg Wunsch" <joerg_wunsch at uriah dot heep dot sax dot de>, "Anatoly Sokolov" <aesok at post dot ru>
- Date: Wed, 11 Jun 2008 22:41:12 -0600
- Subject: RE: [PATCH] Function specific optimization, part 3 of 4, documentation changes
- References: <20080611213615.GC30124@mmeissner-gold.amd.com>
> -----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