Add explicit description for -finline

Message ID 20191101032201.85137-1-luoxhu@linux.ibm.com
State New
Headers show
Series
  • Add explicit description for -finline
Related show

Commit Message

luoxhu Nov. 1, 2019, 3:22 a.m.
-finline is not a explicit option, search word "-finline" in page
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options
will miss the explicit option "-fno-inline".

gcc/ChangeLog:

	2019-11-01  Xiong Hu Luo  <luoxhu@linux.ibm.com>

	doc/invoke.texi (inline): Add description for -finline.
---
 gcc/doc/invoke.texi | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.21.0.777.g83232e3864

Comments

Joseph Myers Nov. 1, 2019, 4:23 p.m. | #1
On Thu, 31 Oct 2019, Xiong Hu Luo wrote:

> +@code{-finline} enables inlining of function declared \"inline\".

> +@code{-finline} is enabled at levels -O1, -O2, -O3 and -Os, but not -Og.


Use @option{} to mark up option names (both -finline and all the -O 
options in this paragraph).  Use @code{} to mark up keyword names, not 
\"\".

-- 
Joseph S. Myers
joseph@codesourcery.com
luoxhu Nov. 4, 2019, 3:42 a.m. | #2
On 2019/11/2 00:23, Joseph Myers wrote:
> On Thu, 31 Oct 2019, Xiong Hu Luo wrote:

> 

>> +@code{-finline} enables inlining of function declared \"inline\".

>> +@code{-finline} is enabled at levels -O1, -O2, -O3 and -Os, but not -Og.

> 

> Use @option{} to mark up option names (both -finline and all the -O

> options in this paragraph).  Use @code{} to mark up keyword names, not

> \"\".

> 


Thanks.  So shall I commit the tiny patch with below updates?

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1407d019d14..ea0d407fe11 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -8576,6 +8576,10 @@ optimizing.
 Single functions can be exempted from inlining by marking them
 with the @code{noinline} attribute.

+@option{-finline} enables inlining of function declared @code{inline}.
+@option{-finline} is enabled at levels @option{-O1}, @option{-O2}, @option{-O3}
+and @option{-Os}, but not @option{-Og}.
+
 @item -finline-small-functions
 @opindex finline-small-functions
 Integrate functions into their callers when their body is smaller than expected
luoxhu Nov. 28, 2019, 1:38 a.m. | #3
On 2019/11/4 11:42, luoxhu wrote:
> On 2019/11/2 00:23, Joseph Myers wrote:

>> On Thu, 31 Oct 2019, Xiong Hu Luo wrote:

>>

>>> +@code{-finline} enables inlining of function declared \"inline\".

>>> +@code{-finline} is enabled at levels -O1, -O2, -O3 and -Os, but not -Og.

>>

>> Use @option{} to mark up option names (both -finline and all the -O

>> options in this paragraph).  Use @code{} to mark up keyword names, not

>> \"\".

>>

> 

> Thanks.  So shall I commit the tiny patch with below updates?

> 

> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi

> index 1407d019d14..ea0d407fe11 100644

> --- a/gcc/doc/invoke.texi

> +++ b/gcc/doc/invoke.texi

> @@ -8576,6 +8576,10 @@ optimizing.

>   Single functions can be exempted from inlining by marking them

>   with the @code{noinline} attribute.

> 

> +@option{-finline} enables inlining of function declared @code{inline}.

> +@option{-finline} is enabled at levels @option{-O1}, @option{-O2}, @option{-O3}

> +and @option{-Os}, but not @option{-Og}.

> +

>   @item -finline-small-functions

>   @opindex finline-small-functions

>   Integrate functions into their callers when their body is smaller than expected

>
Richard Biener Nov. 28, 2019, 8:33 a.m. | #4
On Thu, 28 Nov 2019, luoxhu wrote:

> 

> 

> On 2019/11/4 11:42, luoxhu wrote:

> > On 2019/11/2 00:23, Joseph Myers wrote:

> >> On Thu, 31 Oct 2019, Xiong Hu Luo wrote:

> >>

> >>> +@code{-finline} enables inlining of function declared \"inline\".

> >>> +@code{-finline} is enabled at levels -O1, -O2, -O3 and -Os, but not -Og.

> >>

> >> Use @option{} to mark up option names (both -finline and all the -O

> >> options in this paragraph).  Use @code{} to mark up keyword names, not

> >> \"\".

> >>

> > 

> > Thanks.  So shall I commit the tiny patch with below updates?

> > 

> > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi

> > index 1407d019d14..ea0d407fe11 100644

> > --- a/gcc/doc/invoke.texi

> > +++ b/gcc/doc/invoke.texi

> > @@ -8576,6 +8576,10 @@ optimizing.

> >   Single functions can be exempted from inlining by marking them

> >   with the @code{noinline} attribute.

> > 

> > +@option{-finline} enables inlining of function declared @code{inline}.

> > +@option{-finline} is enabled at levels @option{-O1}, @option{-O2},

> > @option{-O3}

> > +and @option{-Os}, but not @option{-Og}.

> > +


But this is wrong - -finline is enabled at -Og.  I don't think the new
sentence adds anything useful.

> >   @item -finline-small-functions

> >   @opindex finline-small-functions

> >   Integrate functions into their callers when their body is smaller than

> >   expected

> > 

> 

> 


-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1407d019d14..08fc02e1cd3 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -8576,6 +8576,9 @@  optimizing.
 Single functions can be exempted from inlining by marking them
 with the @code{noinline} attribute.
 
+@code{-finline} enables inlining of function declared \"inline\".
+@code{-finline} is enabled at levels -O1, -O2, -O3 and -Os, but not -Og.
+
 @item -finline-small-functions
 @opindex finline-small-functions
 Integrate functions into their callers when their body is smaller than expected