diff mbox series

Add explicit description for -finline

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

Commit Message

Xionghu Luo Nov. 1, 2019, 3:22 a.m. UTC
-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(+)

Comments

Joseph Myers Nov. 1, 2019, 4:23 p.m. UTC | #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 
\"\".
Xionghu Luo Nov. 4, 2019, 3:42 a.m. UTC | #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
Xionghu Luo Nov. 28, 2019, 1:38 a.m. UTC | #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. UTC | #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
> > 
> 
>
diff mbox series

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