This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, committed] Optimization Options improvements


	While answering a colleague's questions about GCC optimization
options, I discovered that the documentation did not consistently
mentioning which options were implied by others.  Also, some default
values for parameters were not mentioned.  The following patch corrects
those omissions.  I committed as obvious.

David


	* doc/invoke.texi (-frename-registers: Add enabled at -O3.
	(-fprofile-values): Add enabled with profile-{generate,use}.
	(-fvpt): Same.
	(-ftracer): Add enabled with profile-use.
	(-funit-at-a-time): Add enabled at -O2,-O3.
	(-funroll-loops): Add enabled with profile-use.
	(-funswitch-loops): Add enabled with profile-use.  Remove duplicates.
	(max-gcse-passes): Mention default.
	(max-cse-path-length): Mention default.

Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.431
diff -c -p -r1.431 invoke.texi
*** invoke.texi	23 Mar 2004 22:20:12 -0000	1.431
--- invoke.texi	23 Mar 2004 22:45:32 -0000
*************** will most benefit processors with lots o
*** 4330,4335 ****
--- 4330,4337 ----
  make debugging impossible, since variables will no longer stay in
  a ``home register''.
  
+ Enabled at levels @option{-O3}.
+ 
  @item -fweb
  @opindex fweb
  Constructs webs as commonly used for register allocation purposes and assign
*************** With @option{-fbranch-probabilities}, it
*** 4531,4536 ****
--- 4533,4540 ----
  from profiling values of expressions and adds @samp{REG_VALUE_PROFILE}
  notes to instructions for their later usage in optimizations.
  
+ Enabled with @option{-profile-generate} and @option{-profile-use}.
+ 
  @item -fvpt
  @opindex fvpt
  If combined with @option{-fprofile-arcs}, it instructs the compiler to add
*************** and actually performs the optimizations 
*** 4541,4546 ****
--- 4545,4552 ----
  Currently the optimizations include specialization of division operation
  using the knowledge about the value of the denominator.
  
+ Enabled with @option{-profile-generate} and @option{-profile-use}.
+ 
  @item -fnew-ra
  @opindex fnew-ra
  Use a graph coloring register allocator.  Currently this option is meant
*************** Perform tail duplication to enlarge supe
*** 4553,4564 ****
--- 4559,4574 ----
  simplifies the control flow of the function allowing other optimizations to do
  better job.
  
+ Enabled with @option{-profile-use}.
+ 
  @item -funit-at-a-time
  @opindex funit-at-a-time
  Parse the whole compilation unit before starting to produce code.
  This allows some extra optimizations to take place but consumes more
  memory.
  
+ Enabled at levels @option{-O2}, @option{-O3}.
+ 
  @item -funroll-loops
  @opindex funroll-loops
  Unroll loops whose number of iterations can be determined at compile time or
*************** upon entry to the loop.  @option{-funrol
*** 4567,4572 ****
--- 4577,4584 ----
  (i.e. complete removal of loops with small constant number of iterations).
  This option makes code larger, and may or may not make it run faster.
  
+ Enabled with @option{-profile-use}.
+ 
  @item -funroll-all-loops
  @opindex funroll-all-loops
  Unroll all loops, even if their number of iterations is uncertain when
*************** Peels the loops for that there is enough
*** 4580,4585 ****
--- 4592,4599 ----
  roll much (from profile feedback).  It also turns on complete loop peeling
  (i.e. complete removal of loops with small constant number of iterations).
  
+ Enabled with @option{-profile-use}.
+ 
  @item -funswitch-loops
  @opindex funswitch-loops
  Move branches with loop invariant conditions out of the loop, with duplicates
*************** recognition is based on notes from front
*** 4601,4616 ****
  @option{-fold-unroll-all-loops} implies the same options as
  @option{-fold-unroll-loops}.
  
- @item -funswitch-loops
- @opindex funswitch-loops
- Move branches with loop invariant conditions out of the loop, with duplicates
- of the loop on both branches (modified according to result of the condition).
- 
- @item -funswitch-loops
- @opindex funswitch-loops
- Move branches with loop invariant conditions out of the loop, with duplicates
- of the loop on both branches (modified according to result of the condition).
- 
  @item -fprefetch-loop-arrays
  @opindex fprefetch-loop-arrays
  If supported by the target machine, generate instructions to prefetch
--- 4615,4620 ----
*************** threading.
*** 4655,4661 ****
  
  @item -fbtr-bb-exclusive
  @opindex fbtr-bb-exclusive
! WHen performing branch target register load optimization, don't reuse
  branch target registers in within any basic block.
  
  @item --param @var{name}=@var{value}
--- 4659,4665 ----
  
  @item -fbtr-bb-exclusive
  @opindex fbtr-bb-exclusive
! When performing branch target register load optimization, don't reuse
  branch target registers in within any basic block.
  
  @item --param @var{name}=@var{value}
*************** optimization.  If more memory than speci
*** 4704,4710 ****
  optimization will not be done.
  
  @item max-gcse-passes
! The maximum number of passes of GCSE to run.
  
  @item max-pending-list-length
  The maximum number of pending dependencies scheduling will allow
--- 4708,4714 ----
  optimization will not be done.
  
  @item max-gcse-passes
! The maximum number of passes of GCSE to run.  The default is 1.
  
  @item max-pending-list-length
  The maximum number of pending dependencies scheduling will allow
*************** order to make tracer effective.
*** 4828,4834 ****
  
  @item max-cse-path-length
  
! Maximum number of basic blocks on path that cse considers.
  
  @item ggc-min-expand
  
--- 4832,4838 ----
  
  @item max-cse-path-length
  
! Maximum number of basic blocks on path that cse considers.  The default is 10.
  
  @item ggc-min-expand
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]