(flag_reduce_all_givs): Likewise.
* loop.c (move_movables): Handle flag_move_all_movables.
(strength_reduce): Handle flag_reduce_all_givs.
* toplev.c (flag_move_all_movables): Define.
(flag_reduce_all_givs): Likewise.
(f_options): Add -fmove-all-movables and -freduce-all-givs.
* invoke.texi: Document new options, including alias stuff that
wasn't included last time.
Two of the "Tooning" options :-)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14987
138bc75d-0d04-0410-961f-
82ee72b054a4
+Wed Aug 27 21:32:20 1997 Jeffrey A Law (law@cygnus.com)
+
+ * flags.h (flag_move_all_movables): Declare.
+ (flag_reduce_all_givs): Likewise.
+ * loop.c (move_movables): Handle flag_move_all_movables.
+ (strength_reduce): Handle flag_reduce_all_givs.
+ * toplev.c (flag_move_all_movables): Define.
+ (flag_reduce_all_givs): Likewise.
+ (f_options): Add -fmove-all-movables and -freduce-all-givs.
+ * invoke.texi: Document new options, including alias stuff that
+ wasn't included last time.
+
Wed Aug 27 18:08:51 1997 Bob Manson (manson@cygnus.com)
* t-h8300: Use TARGET_LIBGCC2_CFLAGS instead of LIBGCC2_CFLAGS.
extern int flag_unroll_all_loops;
+/* Nonzero forces all invariant computations in loops to be moved
+ outside the loop. */
+
+extern int flag_move_all_movables;
+
+/* Nonzero forces all general induction variables in loops to be
+ strength reduced. */
+
+extern int flag_reduce_all_givs;
+
/* Nonzero for -fcse-follow-jumps:
have cse follow jumps to do a more extensive job. */
-frerun-cse-after-loop -fschedule-insns
-fschedule-insns2 -fstrength-reduce -fthread-jumps
-funroll-all-loops -funroll-loops
+-fmove-all-movables -freduce-all-givs
-O -O0 -O1 -O2 -O3
@end smallexample
-freg-struct-return -fshared-data -fshort-enums
-fshort-double -fvolatile -fvolatile-global
-fverbose-asm -fpack-struct -fstack-check +e0 +e1
+-fargument-alias -fargument-noalias
+-fargument-noalias-global
@end smallexample
@end table
and usually makes programs run more slowly. @samp{-funroll-all-loops}
implies @samp{-fstrength-reduce} as well as @samp{-frerun-cse-after-loop}.
+@item -fmove-all-movables
+Forces all invariant computations in loops to be moved
+outside the loop.
+
+@item -freduce-all-givs
+Forces all general-induction variables in loops to be
+strength-reduced.
+
+@emph{Note:} When compiling programs written in Fortran,
+@samp{-fmove-all-moveables} and @samp{-freduce-all-givs} are enabled
+by default when you use the optimizer.
+
+These options may generate better or worse code; results are highly
+dependent on the structure of loops within the source code.
+
+These two options are intended to be removed someday, once
+they have helped determine the efficacy of various
+approaches to improving loop optimizations.
+
+Please let us (@code{egcs@cygnus.com and fortran@@gnu.ai.mit.edu})
+know how use of these options affects
+the performance of your production code.
+We're very interested in code that runs @emph{slower}
+when these options are @emph{enabled}.
+
@item -fno-peephole
Disable any machine-specific peephole optimizations.
With @samp{+e1}, G++ actually generates the code implementing virtual
functions defined in the code, and makes them publicly visible.
+
+@cindex aliasing of parameters
+@cindex parameters, aliased
+@item -fargument-alias
+@item -fargument-noalias
+@item -fargument-noalias-global
+Specify the possible relationships among parameters and between
+parameters and global data.
+
+@samp{-fargument-alias} specifies that arguments (parameters) may
+alias each other and may alias global storage.
+@samp{-fargument-noalias} specifies that arguments do not alias
+each other, but may alias global storage.
+@samp{-fargument-noalias-global} specifies that arguments do not
+alias each other and do not alias global storage.
+
+Each language will automatically use whatever option is required by
+the language standard. You should not need to use these options yourself.
@end table
@node Environment Variables
extra cost because something else was already moved. */
if (already_moved[regno]
+ || flag_move_all_movables
|| (threshold * savings * m->lifetime) >= insn_count
|| (m->forces && m->forces->done
&& n_times_used[m->forces->regno] == 1))
of such giv's whether or not we know they are used after the loop
exit. */
- if (v->lifetime * threshold * benefit < insn_count
- && ! bl->reversed)
+ if ( ! flag_reduce_all_givs && v->lifetime * threshold * benefit < insn_count
+ && ! bl->reversed )
{
if (loop_dump_stream)
fprintf (loop_dump_stream,
int flag_unroll_all_loops;
+/* Nonzero forces all invariant computations in loops to be moved
+ outside the loop. */
+
+int flag_move_all_movables = 0;
+
+/* Nonzero forces all general induction variables in loops to be
+ strength reduced. */
+
+int flag_reduce_all_givs = 0;
+
/* Nonzero for -fwritable-strings:
store string constants in data segment and don't uniquize them. */
{"strength-reduce", &flag_strength_reduce, 1},
{"unroll-loops", &flag_unroll_loops, 1},
{"unroll-all-loops", &flag_unroll_all_loops, 1},
+ {"move-all-movables", &flag_move_all_movables, 1},
+ {"reduce-all-givs", &flag_reduce_all_givs, 1},
{"writable-strings", &flag_writable_strings, 1},
{"peephole", &flag_no_peephole, 0},
{"force-mem", &flag_force_mem, 1},