This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH for Re: -finline-functions default with -Os ?
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: Frédéric L. W. Meunier <fredlwm at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Oct 2010 19:04:29 +0200 (CEST)
- Subject: PATCH for Re: -finline-functions default with -Os ?
- References: <alpine.LNX.2.00.1007031742100.19750@dyndns.pervalidus.net> <AANLkTinweFIwTIpI-1SsPm47Q5mqQRaEsvwH2S2C0ote@mail.gmail.com>
[ gcc -> gcc-patches ]
On Sat, 3 Jul 2010, Steven Bosscher wrote:
> 2010/7/3 Frédéric L. W. Meunier <fredlwm@gmail.com>:
>> Here, -finline-functions appears to be the default using -Os with GCC
>> 4.4.4 on Linux (tested with k8-sse3 and 486).
>>
>> But according to the man page, "Enabled at level -O3". Does the manual
>> need a fix ?
>
> Yes, it should say "Enabled at levels -O3 and -Os".
Hmm, somehow I just see nobody has made this fix?
Would something like the following be appropriate? I checked opts.c,
and that agrees with your assessment.
(On a tangent, I am a bit puzzled why we would enable something at
-O3 and -Os, but not -O2?)
Gerald
2010-10-17 Gerald Pfeifer <gerald@pfeifer.com>
* doc/invoke.texi (-finline-functions): Is also enabled at -Os.
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 165562)
+++ doc/invoke.texi (working copy)
@@ -6043,7 +6043,7 @@
declared @code{static}, then the function is normally not output as
assembler code in its own right.
-Enabled at level @option{-O3}.
+Enabled at level @option{-O3} and @option{-Os}.
@item -finline-functions-called-once
@opindex finline-functions-called-once