Bug 87829 - Contradiction about -fReorder-Blocks
Summary: Contradiction about -fReorder-Blocks
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: web (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Martin Liška
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2018-10-31 11:47 UTC by MCCCS
Modified: 2019-03-28 08:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 7.4.1, 8.3.1, 9.0
Known to fail: 7.4.0, 8.3.0
Last reconfirmed: 2018-10-31 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MCCCS 2018-10-31 11:47:04 UTC
On this page: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
(invoke.texi)
It says:

@option{-Os} disables the following optimization flags:
@gccoptlist{-falign-functions  -falign-jumps  -falign-loops @gol
-falign-labels  -freorder-blocks  -freorder-blocks-algorithm=stc @gol
-freorder-blocks-and-partition  -fprefetch-loop-arrays}

If you scroll down, it says:

@item -freorder-blocks
@opindex freorder-blocks
Reorder basic blocks in the compiled function in order to reduce number of
taken branches and improve code locality.

Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.

Is it enabled in -Os or not? They contradict.

Also for -freorder-blocks-algorithm and -freorder-blocks-and-partition
Comment 1 Richard Biener 2018-10-31 12:19:04 UTC
These are two different but yes, the -freorder-blocks info looks wrong,
it is indeed enabled with -Os, thust the algorithm used is different.
Comment 2 Martin Liška 2018-10-31 12:42:14 UTC
Let me fix that.
Comment 3 Martin Liška 2018-11-05 07:34:29 UTC
Author: marxin
Date: Mon Nov  5 07:33:58 2018
New Revision: 265786

URL: https://gcc.gnu.org/viewcvs?rev=265786&root=gcc&view=rev
Log:
Remove options that are not disabled with -Os (PR web/87829).

2018-11-05  Martin Liska  <mliska@suse.cz>

	PR web/87829
	* doc/invoke.texi: Remove options that are
	not disabled with -Os.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/invoke.texi
Comment 4 Martin Liška 2018-11-05 07:35:21 UTC
Fixed on trunk.
Comment 5 Martin Liška 2019-03-27 12:23:21 UTC
Reopen..
Comment 6 Martin Liška 2019-03-28 08:52:17 UTC
Author: marxin
Date: Thu Mar 28 08:51:46 2019
New Revision: 269986

URL: https://gcc.gnu.org/viewcvs?rev=269986&root=gcc&view=rev
Log:
Backport r265786

2019-03-28  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2018-11-05  Martin Liska  <mliska@suse.cz>

	PR web/87829
	* doc/invoke.texi: Remove options that are
	not disabled with -Os.

Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/doc/invoke.texi
Comment 7 Martin Liška 2019-03-28 08:54:21 UTC
Author: marxin
Date: Thu Mar 28 08:53:49 2019
New Revision: 269987

URL: https://gcc.gnu.org/viewcvs?rev=269987&root=gcc&view=rev
Log:
Backport r265786

2019-03-28  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2018-11-05  Martin Liska  <mliska@suse.cz>

	PR web/87829
	* doc/invoke.texi: Remove options that are
	not disabled with -Os.

Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/doc/invoke.texi
Comment 8 Martin Liška 2019-03-28 08:55:35 UTC
Fixed on all active branches.