11280 – [3.3/3.4 Regression] Manual incorrect WRT -freorder-blocks (original) (raw)

The manual item for -freorder-blocks says:-

Enabled at levels -O2, -O3, -Os.

Yet, in the same manual, the item for -Os says:-

-Os disables the following optimization flags:

      -falign-functions  -falign-jumps  -falign-loops 
      -falign-labels  -freorder-blocks  -fprefetch-loop-arrays

Obviously, one has to be wrong.

Compiling a test program with "-fverbose-asm -S" confirms that -freorder-blocks is not used at -Os

Comment 1 Drea Pinski 2003-06-22 04:08:44 UTC

Confirm with respect to the documentation on the web site and looking at toplev.c and seeing that -Os disables reorder blocks. This (regression?) is caused by the following patch: 2003-01-24 Jerry Quinn <jlquinn@optonline.net>

    * gcc/doc/invoke.texi (Optimization Options): List -O levels
    for each optimization flag.

which did not update for the following patch which was made earlier (4 months) 2002-08-01 Richard Henderson <rth@redhat.com>

    * toplev.c (parse_options_and_default_flags): Don't set
    flag_reorder_blocks for -Os.

I am adding jlquinn@optonline.net as he made the orginal patch to list the -O levels for each optimization flag.

Comment 3 Gerald Pfeifer 2003-06-25 08:29:21 UTC

Patch committed to mainline and 3.3-branch.