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]

Re: Add extra optimizations: -Ox



On Fri, 9 Mar 2001, Richard Kenner wrote:

>     > This patch fails to include changes to invoke.texi to document the new
>     > flag.
>     
>     That's because I wasn't sure whether you guys will incorporate it or not;
>     it was rather a suggestion than a patch.
> 
> In that case, the invoke.texi was the most important part of the patch,
> since it says what your proposed new flag is supposed to do.

Okay. There is a *proposal* below.
Please note that the code previously submitted (at the beginning of this
discussion thread) is *not* conformant to this documentation patch.
That's because the current intention (i.e. to have -Ox2, -Ox3) differs
from the original intention (i.e. to have -O2 -Ox, or -O3 -Ox), to be
consistent with the current behavior when having multiple -O... options.

You might decide that only -Ox2 or only -Ox3 is worth keeping.
In that case, it will become -Ox.

After the doc patch will get its final shape (if any), then I will also
submit the code patches.

Cosmin


ChangeLog entry:

Fri 16 Mar 2001  Cosmin Truta <cosmint@cs.ubbcluj.ro>
	* invoke.texi: Propose additional optimization options: -Ox<number>


Index: gcc/gcc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/invoke.texi,v
retrieving revision 1.273.2.7
diff -c -3 -p -r1.273.2.7 invoke.texi
*** invoke.texi	2001/03/06 07:28:01	1.273.2.7
--- invoke.texi	2001/03/16 23:30:06
*************** in the following sections.
*** 256,262 ****
  -fstrength-reduce  -fstrict-aliasing  -fthread-jumps  -ftrapv @gol
  -funroll-all-loops  -funroll-loops  @gol
  --param @var{name}=@var{value}
! -O  -O0  -O1  -O2  -O3  -Os}
  
  @item Preprocessor Options
  @xref{Preprocessor Options,,Options Controlling the Preprocessor}.
--- 256,262 ----
  -fstrength-reduce  -fstrict-aliasing  -fthread-jumps  -ftrapv @gol
  -funroll-all-loops  -funroll-loops  @gol
  --param @var{name}=@var{value}
! -O  -O0  -O1  -O2  -O3  -Os  -Ox  -Ox1  -Ox2  -Ox3}
  
  @item Preprocessor Options
  @xref{Preprocessor Options,,Options Controlling the Preprocessor}.
*************** Do not optimize.
*** 2784,2789 ****
--- 2784,2804 ----
  Optimize for size.  @samp{-Os} enables all @samp{-O2} optimizations that
  do not typically increase code size.  It also performs further
  optimizations designed to reduce code size.
+ 
+ @item -Ox
+ @itemx -Ox1
+ @itemx -Ox2
+ Optimize for extra speed without involving a space-speed tradeoff,
+ even if debugging might be impossible.
+ @samp{-Ox2} turns on all the optimizations specified by @samp{-O2}
+ and also turns on the @samp{-fomit-frame-pointer} and
+ @samp{-frename-registers} options.
+ 
+ @item -Ox3
+ Optimize for extra speed, even if debugging might be impossible.
+ @samp{-Ox3} turns on all the optimizations specified by @samp{-O3}
+ and also turns on the @samp{-fomit-frame-pointer} and
+ @samp{-funroll-loops} options.
  
  If you use multiple @samp{-O} options, with or without level numbers,
  the last such option is the one that is effective.


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