diff mbox

[doc] Correct optimisation levels documentation for -fstore-merging

Message ID 58863D28.6070906@foss.arm.com
State New
Headers show

Commit Message

Kyrill Tkachov Jan. 23, 2017, 5:28 p.m. UTC
Hi all,

I had forgotten to update the -fstore-merging documentation from a previous iteration of the pass
and it says that it's enabled at -O and higher. The option is in fact enabled at -O2 and higher, as well as -Os.
This patch clarifies that.

Is this ok? Or is there a more preferred style of listing optimisation levels?

Thanks,
Kyrill

2016-01-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * doc/invoke.texi (-fstore-merging): Correct default optimization
     levels at which it is enabled.

Comments

Sandra Loosemore Jan. 23, 2017, 6:39 p.m. UTC | #1
On 01/23/2017 10:28 AM, Kyrill Tkachov wrote:
> Hi all,
>
> I had forgotten to update the -fstore-merging documentation from a
> previous iteration of the pass
> and it says that it's enabled at -O and higher. The option is in fact
> enabled at -O2 and higher, as well as -Os.
> This patch clarifies that.
>
> Is this ok? Or is there a more preferred style of listing optimisation
> levels?
>
> Thanks,
> Kyrill
>
> 2016-01-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>      * doc/invoke.texi (-fstore-merging): Correct default optimization
>      levels at which it is enabled.

It looks to me like you also need to move -fstore-merging from the list 
of optimizations enabled by -O to the list documented under -O2.

-Sandra
Jeff Law Jan. 23, 2017, 11:39 p.m. UTC | #2
On 01/23/2017 10:28 AM, Kyrill Tkachov wrote:
> Hi all,
>
> I had forgotten to update the -fstore-merging documentation from a
> previous iteration of the pass
> and it says that it's enabled at -O and higher. The option is in fact
> enabled at -O2 and higher, as well as -Os.
> This patch clarifies that.
>
> Is this ok? Or is there a more preferred style of listing optimisation
> levels?
>
> Thanks,
> Kyrill
>
> 2016-01-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>     * doc/invoke.texi (-fstore-merging): Correct default optimization
>     levels at which it is enabled.
I think you also need to remove -fstore-merging from list of options 
turned on by -O:

@option{-O} turns on the following optimization flags:
[ ... ]
-fstore-merging @gol


And instead add it to the list of options enabled at -O2 and higher 
which immediately follows.

OK with those changes.

jeff
diff mbox

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 45af80c..b29348c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -8342,7 +8342,7 @@  early.  This flag is enabled by default at @option{-O} and higher.
 Perform merging of narrow stores to consecutive memory addresses.  This pass
 merges contiguous stores of immediate values narrower than a word into fewer
 wider stores to reduce the number of instructions.  This is enabled by default
-at @option{-O} and higher.
+at @option{-O2} and higher as well as @option{-Os}.
 
 @item -ftree-ter
 @opindex ftree-ter