Commit e01c66ca by Segher Boessenkool Committed by Segher Boessenkool

bb-reorder: Documentation updates


2015-09-23   Segher Boessenkool  <segher@kernel.crashing.org>

	* doc/invoke.texi (Optimization Options): Add
	-freorder-blocks-algorithm=.
	(Optimize Options) <-O>: Add -freorder-blocks.
	<-O2>: Remove -freorder-blocks.  Add -freorder-blocks-algorithm=stc.
	<-Os>: Add -freorder-blocks-algorithm=stc as not enabled.
	<-freorder-blocks>: Also enabled at levels -O and -Os.
	<-freorder-blocks-algorithm=>: Document new option.

From-SVN: r228319
parent 59faab7c
2015-10-01 Segher Boessenkool <segher@kernel.crashing.org> 2015-10-01 Segher Boessenkool <segher@kernel.crashing.org>
* doc/invoke.texi (Optimization Options): Add
-freorder-blocks-algorithm=.
(Optimize Options) <-O>: Add -freorder-blocks.
<-O2>: Remove -freorder-blocks. Add -freorder-blocks-algorithm=stc.
<-Os>: Add -freorder-blocks-algorithm=stc as not enabled.
<-freorder-blocks>: Also enabled at levels -O and -Os.
<-freorder-blocks-algorithm=>: Document new option.
2015-10-01 Segher Boessenkool <segher@kernel.crashing.org>
* bb-reorder.c (reorder_basic_blocks): Use the algorithm selected * bb-reorder.c (reorder_basic_blocks): Use the algorithm selected
with flag_reorder_blocks_algorithm. with flag_reorder_blocks_algorithm.
* common.opt (freorder-blocks-algorithm=): New flag. * common.opt (freorder-blocks-algorithm=): New flag.
...@@ -430,6 +430,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -430,6 +430,7 @@ Objective-C and Objective-C++ Dialects}.
-fprofile-use -fprofile-use=@var{path} -fprofile-values @gol -fprofile-use -fprofile-use=@var{path} -fprofile-values @gol
-fprofile-reorder-functions @gol -fprofile-reorder-functions @gol
-freciprocal-math -free -frename-registers -freorder-blocks @gol -freciprocal-math -free -frename-registers -freorder-blocks @gol
-freorder-blocks-algorithm=@var{algorithm} @gol
-freorder-blocks-and-partition -freorder-functions @gol -freorder-blocks-and-partition -freorder-functions @gol
-frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol -frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol
-frounding-math -fsched2-use-superblocks -fsched-pressure @gol -frounding-math -fsched2-use-superblocks -fsched-pressure @gol
...@@ -7689,6 +7690,7 @@ compilation time. ...@@ -7689,6 +7690,7 @@ compilation time.
-fipa-reference @gol -fipa-reference @gol
-fmerge-constants @gol -fmerge-constants @gol
-fmove-loop-invariants @gol -fmove-loop-invariants @gol
-freorder-blocks @gol
-fshrink-wrap @gol -fshrink-wrap @gol
-fsplit-wide-types @gol -fsplit-wide-types @gol
-ftree-bit-ccp @gol -ftree-bit-ccp @gol
...@@ -7745,7 +7747,8 @@ also turns on the following optimization flags: ...@@ -7745,7 +7747,8 @@ also turns on the following optimization flags:
-foptimize-strlen @gol -foptimize-strlen @gol
-fpartial-inlining @gol -fpartial-inlining @gol
-fpeephole2 @gol -fpeephole2 @gol
-freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol -freorder-blocks-algorithm=stc @gol
-freorder-blocks-and-partition -freorder-functions @gol
-frerun-cse-after-loop @gol -frerun-cse-after-loop @gol
-fsched-interblock -fsched-spec @gol -fsched-interblock -fsched-spec @gol
-fschedule-insns -fschedule-insns2 @gol -fschedule-insns -fschedule-insns2 @gol
...@@ -7782,8 +7785,8 @@ optimizations designed to reduce code size. ...@@ -7782,8 +7785,8 @@ optimizations designed to reduce code size.
@option{-Os} disables the following optimization flags: @option{-Os} disables the following optimization flags:
@gccoptlist{-falign-functions -falign-jumps -falign-loops @gol @gccoptlist{-falign-functions -falign-jumps -falign-loops @gol
-falign-labels -freorder-blocks -freorder-blocks-and-partition @gol -falign-labels -freorder-blocks -freorder-blocks-algorithm=stc @gol
-fprefetch-loop-arrays} -freorder-blocks-and-partition -fprefetch-loop-arrays}
@item -Ofast @item -Ofast
@opindex Ofast @opindex Ofast
...@@ -9134,7 +9137,19 @@ The default is @option{-fguess-branch-probability} at levels ...@@ -9134,7 +9137,19 @@ The default is @option{-fguess-branch-probability} at levels
Reorder basic blocks in the compiled function in order to reduce number of Reorder basic blocks in the compiled function in order to reduce number of
taken branches and improve code locality. taken branches and improve code locality.
Enabled at levels @option{-O2}, @option{-O3}. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
@item -freorder-blocks-algorithm=@var{algorithm}
@opindex freorder-blocks-algorithm
Use the specified algorithm for basic block reordering. The
@var{algorithm} argument can be @samp{simple}, which does not increase
code size (except sometimes due to secondary effects like alignment),
or @samp{stc}, the ``software trace cache'' algorithm, which tries to
put all often executed code together, minimizing the number of branches
executed by making extra copies of code.
The default is @samp{simple} at levels @option{-O}, @option{-Os}, and
@samp{stc} at levels @option{-O2}, @option{-O3}.
@item -freorder-blocks-and-partition @item -freorder-blocks-and-partition
@opindex freorder-blocks-and-partition @opindex freorder-blocks-and-partition
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment