aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-02-01 09:20:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-02-01 09:20:32 +0000
commit99ea07f8f023b526acc127036309ec6ed4aad2c0 (patch)
tree569a7239350db03c992e307a8a1cd77ccbc08694 /gcc
parent3db684fb8962ab3ac3144ea860858b280519d39c (diff)
downloadgcc-99ea07f8f023b526acc127036309ec6ed4aad2c0.zip
gcc-99ea07f8f023b526acc127036309ec6ed4aad2c0.tar.gz
gcc-99ea07f8f023b526acc127036309ec6ed4aad2c0.tar.bz2
invoke.texi (fno-inline): Clarify documentation.
2012-02-01 Richard Guenther <rguenther@suse.de> * doc/invoke.texi (fno-inline): Clarify documentation. (finline-small-functions): Likewise. (finline-functions): Likewise. * common.opt (finline): Adjust comment and documentation. (finline-small-functions): Clarify documentation. (finline-functions): Likewise. (finline-functions-called-once): Likewise. From-SVN: r183792
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/common.opt15
-rw-r--r--gcc/doc/invoke.texi18
3 files changed, 27 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f2025eb..32a86f0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-01 Richard Guenther <rguenther@suse.de>
+
+ * doc/invoke.texi (fno-inline): Clarify documentation.
+ (finline-small-functions): Likewise.
+ (finline-functions): Likewise.
+ * common.opt (finline): Adjust comment and documentation.
+ (finline-small-functions): Clarify documentation.
+ (finline-functions): Likewise.
+ (finline-functions-called-once): Likewise.
+
2012-02-01 Tristan Gingold <gingold@adacore.com>
* c-typeck.c (composite_type): Keep mode for pointers.
diff --git a/gcc/common.opt b/gcc/common.opt
index ec1dbd1..984825d 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1245,26 +1245,23 @@ findirect-inlining
Common Report Var(flag_indirect_inlining)
Perform indirect inlining
-; Nonzero means that functions declared `inline' will be treated
-; as `static'. Prevents generation of zillions of copies of unused
-; static inline functions; instead, `inlines' are written out
-; only when actually used. Used in conjunction with -g. Also
-; does the right thing with #pragma interface.
+; General flag to enable inlining. Specifying -fno-inline will disable
+; all inlining apart from always-inline functions.
finline
Common Report Var(flag_no_inline,0) Init(0)
-Pay attention to the \"inline\" keyword
+Enable inlining of function declared \"inline\", disabling disables all inlining
finline-small-functions
Common Report Var(flag_inline_small_functions) Optimization
-Integrate simple functions into their callers when code size is known to not growth
+Integrate functions into their callers when code size is known not to grow
finline-functions
Common Report Var(flag_inline_functions) Optimization
-Integrate simple functions into their callers
+Integrate functions not declared \"inline\" into their callers when profitable
finline-functions-called-once
Common Report Var(flag_inline_functions_called_once) Optimization
-Integrate functions called once into their callers
+Integrate functions only required by their single caller
finline-limit-
Common RejectNegative Joined Alias(finline-limit=)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5de72f4..9eb9d32 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6335,16 +6335,20 @@ Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
@item -fno-inline
@opindex fno-inline
-Don't pay attention to the @code{inline} keyword. Normally this option
-is used to keep the compiler from expanding any functions inline.
-Note that if you are not optimizing, no functions can be expanded inline.
+Do not expand any functions inline apart from those marked with
+the @code{always_inline} attribute. This is the default when not
+optimizing.
+
+Single functions can be exempted from inlining by marking them
+with the @code{noinline} attribute.
@item -finline-small-functions
@opindex finline-small-functions
Integrate functions into their callers when their body is smaller than expected
function call code (so overall size of program gets smaller). The compiler
heuristically decides which functions are simple enough to be worth integrating
-in this way.
+in this way. This inlining applies to all functions, even those not declared
+inline.
Enabled at level @option{-O2}.
@@ -6359,9 +6363,9 @@ Enabled at level @option{-O2}.
@item -finline-functions
@opindex finline-functions
-Integrate all simple functions into their callers. The compiler
-heuristically decides which functions are simple enough to be worth
-integrating in this way.
+Consider all functions for inlining, even if they are not declared inline.
+The compiler heuristically decides which functions are worth integrating
+in this way.
If all calls to a given function are integrated, and the function is
declared @code{static}, then the function is normally not output as