Commit efa1cdf0 by Zdenek Dvorak Committed by Zdenek Dvorak

opts.c (decode_options): Do not handle flag_strength_reduce.

	* opts.c (decode_options): Do not handle flag_strength_reduce.
	(common_handle_option): Handle OPT_floop_optimize, OPT_frerun_loop_opt
	and OPT_fstrength_reduce.
	* tree-ssa-loop.c (tree_ssa_loop_prefetch): Only test
	flag_prefetch_loop_arrays for being nonzero.
	* common.opt (floop-optimize, frerun-loop-opt): Resurrected as
	no-ops.
	(fprefetch-loop-arrays-rtl): Removed.
	(flag_prefetch_loop_arrays): Do not specify the value.

	* doc/passes.texi: Update documentation of loop optimizer
	passes.
	* doc/invoke.texi (-fstrength-reduce, -fprefetch-loop-arrays-rtl,
	-frerun-loop-opt): Remove.

	* gcc.target/i386/20000614-2.c: Do not use -fno-strength-reduce.
	* gcc.dg/20030324-1.c: Do not use -fstrength-reduce.

From-SVN: r111469
parent 63a06ed2
2006-02-26 Zdenek Dvorak <dvorakz@suse.cz>
* opts.c (decode_options): Do not handle flag_strength_reduce.
(common_handle_option): Handle OPT_floop_optimize, OPT_frerun_loop_opt
and OPT_fstrength_reduce.
* tree-ssa-loop.c (tree_ssa_loop_prefetch): Only test
flag_prefetch_loop_arrays for being nonzero.
* common.opt (floop-optimize, frerun-loop-opt): Resurrected as
no-ops.
(fprefetch-loop-arrays-rtl): Removed.
(flag_prefetch_loop_arrays): Do not specify the value.
* doc/passes.texi: Update documentation of loop optimizer
passes.
* doc/invoke.texi (-fstrength-reduce, -fprefetch-loop-arrays-rtl,
-frerun-loop-opt): Remove.
2006-02-26 Richard Guenther <rguenther@suse.de> 2006-02-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/26421 PR tree-optimization/26421
......
...@@ -555,6 +555,10 @@ fleading-underscore ...@@ -555,6 +555,10 @@ fleading-underscore
Common Report Var(flag_leading_underscore) Init(-1) Common Report Var(flag_leading_underscore) Init(-1)
Give external symbols a leading underscore Give external symbols a leading underscore
floop-optimize
Common
Does nothing. Preserved for backward compatability.
fmath-errno fmath-errno
Common Report Var(flag_errno_math) Init(1) Common Report Var(flag_errno_math) Init(1)
Set errno after built-in math functions Set errno after built-in math functions
...@@ -659,11 +663,7 @@ Common Report Var(flag_pie,1) VarExists ...@@ -659,11 +663,7 @@ Common Report Var(flag_pie,1) VarExists
Generate position-independent code for executables if possible (small mode) Generate position-independent code for executables if possible (small mode)
fprefetch-loop-arrays fprefetch-loop-arrays
Common Report Var(flag_prefetch_loop_arrays,1) Common Report Var(flag_prefetch_loop_arrays)
Generate prefetch instructions, if available, for arrays in loops
fprefetch-loop-arrays-rtl
Common Report Var(flag_prefetch_loop_arrays,2)
Generate prefetch instructions, if available, for arrays in loops Generate prefetch instructions, if available, for arrays in loops
fprofile fprofile
...@@ -721,6 +721,10 @@ frerun-cse-after-loop ...@@ -721,6 +721,10 @@ frerun-cse-after-loop
Common Report Var(flag_rerun_cse_after_loop) Init(2) Common Report Var(flag_rerun_cse_after_loop) Init(2)
Add a common subexpression elimination pass after loop optimizations Add a common subexpression elimination pass after loop optimizations
frerun-loop-opt
Common
Does nothing. Preserved for backward compatability.
frounding-math frounding-math
Common Report Var(flag_rounding_math) Common Report Var(flag_rounding_math)
Disable optimizations that assume default FP rounding behavior Disable optimizations that assume default FP rounding behavior
...@@ -837,8 +841,8 @@ Common Report RejectNegative Var(flag_stack_protect, 2) VarExists ...@@ -837,8 +841,8 @@ Common Report RejectNegative Var(flag_stack_protect, 2) VarExists
Use a stack protection method for every function Use a stack protection method for every function
fstrength-reduce fstrength-reduce
Common Report Var(flag_strength_reduce) Common
Perform strength reduction optimizations Does nothing. Preserved for backward compatability.
; Nonzero if we should do (language-dependent) alias analysis. ; Nonzero if we should do (language-dependent) alias analysis.
; Typically, this analysis will assume that expressions of certain ; Typically, this analysis will assume that expressions of certain
......
...@@ -107,7 +107,7 @@ the directories are searched in the order specified. ...@@ -107,7 +107,7 @@ the directories are searched in the order specified.
Many options have long names starting with @samp{-f} or with Many options have long names starting with @samp{-f} or with
@samp{-W}---for example, @samp{-W}---for example,
@option{-fstrength-reduce}, @option{-Wformat} and so on. Most of @option{-fmove-loop-invariants}, @option{-Wformat} and so on. Most of
these have both positive and negative forms; the negative form of these have both positive and negative forms; the negative form of
@option{-ffoo} would be @option{-fno-foo}. This manual documents @option{-ffoo} would be @option{-fno-foo}. This manual documents
only one of these two forms, whichever one is not the default. only one of these two forms, whichever one is not the default.
...@@ -321,11 +321,11 @@ Objective-C and Objective-C++ Dialects}. ...@@ -321,11 +321,11 @@ Objective-C and Objective-C++ Dialects}.
-funsafe-math-optimizations -funsafe-loop-optimizations -ffinite-math-only @gol -funsafe-math-optimizations -funsafe-loop-optimizations -ffinite-math-only @gol
-fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
-fomit-frame-pointer -foptimize-register-move @gol -fomit-frame-pointer -foptimize-register-move @gol
-foptimize-sibling-calls -fprefetch-loop-arrays -fprefetch-loop-arrays-rtl @gol -foptimize-sibling-calls -fprefetch-loop-arrays @gol
-fprofile-generate -fprofile-use @gol -fprofile-generate -fprofile-use @gol
-fregmove -frename-registers @gol -fregmove -frename-registers @gol
-freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol -freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
-frerun-cse-after-loop -frerun-loop-opt @gol -frerun-cse-after-loop @gol
-frounding-math -frtl-abstract-sequences @gol -frounding-math -frtl-abstract-sequences @gol
-fschedule-insns -fschedule-insns2 @gol -fschedule-insns -fschedule-insns2 @gol
-fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol -fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
...@@ -335,7 +335,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -335,7 +335,7 @@ Objective-C and Objective-C++ Dialects}.
-fsched2-use-traces -freschedule-modulo-scheduled-loops @gol -fsched2-use-traces -freschedule-modulo-scheduled-loops @gol
-fsection-anchors -fsignaling-nans -fsingle-precision-constant @gol -fsection-anchors -fsignaling-nans -fsingle-precision-constant @gol
-fstack-protector -fstack-protector-all @gol -fstack-protector -fstack-protector-all @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol -fstrict-aliasing -ftracer -fthread-jumps @gol
-funroll-all-loops -funroll-loops -fpeel-loops @gol -funroll-all-loops -funroll-loops -fpeel-loops @gol
-fsplit-ivs-in-unroller -funswitch-loops @gol -fsplit-ivs-in-unroller -funswitch-loops @gol
-fvariable-expansion-in-unroller @gol -fvariable-expansion-in-unroller @gol
...@@ -4434,8 +4434,7 @@ also turns on the following optimization flags: ...@@ -4434,8 +4434,7 @@ also turns on the following optimization flags:
-fcse-follow-jumps -fcse-skip-blocks @gol -fcse-follow-jumps -fcse-skip-blocks @gol
-fgcse -fgcse-lm @gol -fgcse -fgcse-lm @gol
-fexpensive-optimizations @gol -fexpensive-optimizations @gol
-fstrength-reduce @gol -frerun-cse-after-loop @gol
-frerun-cse-after-loop -frerun-loop-opt @gol
-fcaller-saves @gol -fcaller-saves @gol
-fpeephole2 @gol -fpeephole2 @gol
-fschedule-insns -fschedule-insns2 @gol -fschedule-insns -fschedule-insns2 @gol
...@@ -4670,8 +4669,7 @@ register, compare it against zero, then branch based upon the result. ...@@ -4670,8 +4669,7 @@ register, compare it against zero, then branch based upon the result.
This option is only meaningful on architectures that support such This option is only meaningful on architectures that support such
instructions, which include x86, PowerPC, IA-64 and S/390. instructions, which include x86, PowerPC, IA-64 and S/390.
The default is @option{-fbranch-count-reg}, enabled when The default is @option{-fbranch-count-reg}.
@option{-fstrength-reduce} is enabled.
@item -fno-function-cse @item -fno-function-cse
@opindex fno-function-cse @opindex fno-function-cse
...@@ -4730,13 +4728,6 @@ instrumentation (and therefore faster execution) and still provides ...@@ -4730,13 +4728,6 @@ instrumentation (and therefore faster execution) and still provides
some protection against outright memory corrupting writes, but allows some protection against outright memory corrupting writes, but allows
erroneously read data to propagate within a program. erroneously read data to propagate within a program.
@item -fstrength-reduce
@opindex fstrength-reduce
Perform the optimizations of loop strength reduction and
elimination of iteration variables.
Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
@item -fthread-jumps @item -fthread-jumps
@opindex fthread-jumps @opindex fthread-jumps
Perform optimizations where we check to see if a jump branches to a Perform optimizations where we check to see if a jump branches to a
...@@ -5130,9 +5121,9 @@ better job. ...@@ -5130,9 +5121,9 @@ better job.
@item -funroll-loops @item -funroll-loops
@opindex funroll-loops @opindex funroll-loops
Unroll loops whose number of iterations can be determined at compile Unroll loops whose number of iterations can be determined at compile
time or upon entry to the loop. @option{-funroll-loops} implies both time or upon entry to the loop. @option{-funroll-loops} implies
@option{-fstrength-reduce} and @option{-frerun-cse-after-loop}. This @option{-frerun-cse-after-loop}. This option makes code larger,
option makes code larger, and may or may not make it run faster. and may or may not make it run faster.
@item -funroll-all-loops @item -funroll-all-loops
@opindex funroll-all-loops @opindex funroll-all-loops
...@@ -5160,15 +5151,15 @@ With this option, the compiler will create multiple copies of some ...@@ -5160,15 +5151,15 @@ With this option, the compiler will create multiple copies of some
local variables when unrolling a loop which can result in superior code. local variables when unrolling a loop which can result in superior code.
@item -fprefetch-loop-arrays @item -fprefetch-loop-arrays
@itemx -fprefetch-loop-arrays-rtl
@opindex fprefetch-loop-arrays @opindex fprefetch-loop-arrays
@opindex fprefetch-loop-arrays-rtl
If supported by the target machine, generate instructions to prefetch If supported by the target machine, generate instructions to prefetch
memory to improve the performance of loops that access large arrays. memory to improve the performance of loops that access large arrays.
These options may generate better or worse code; results are highly This option may generate better or worse code; results are highly
dependent on the structure of loops within the source code. dependent on the structure of loops within the source code.
Disabled at level @option{-Os}.
@item -fno-peephole @item -fno-peephole
@itemx -fno-peephole2 @itemx -fno-peephole2
@opindex fno-peephole @opindex fno-peephole
...@@ -5698,15 +5689,6 @@ at level @option{-O1} ...@@ -5698,15 +5689,6 @@ at level @option{-O1}
Move branches with loop invariant conditions out of the loop, with duplicates 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). of the loop on both branches (modified according to result of the condition).
@item -fprefetch-loop-arrays
@itemx -fprefetch-loop-arrays-rtl
@opindex fprefetch-loop-arrays
@opindex fprefetch-loop-arrays-rtl
If supported by the target machine, generate instructions to prefetch
memory to improve the performance of loops that access large arrays.
Disabled at level @option{-Os}.
@item -ffunction-sections @item -ffunction-sections
@itemx -fdata-sections @itemx -fdata-sections
@opindex ffunction-sections @opindex ffunction-sections
......
...@@ -574,20 +574,15 @@ are in @file{lcm.c}. ...@@ -574,20 +574,15 @@ are in @file{lcm.c}.
@item Loop optimization @item Loop optimization
This pass moves constant expressions out of loops, and optionally does This pass performs several loop related optimizations.
strength-reduction as well. The pass is located in @file{loop.c}. The source files @file{cfgloopanal.c} and @file{cfgloopmanip.c} contain
Loop dependency analysis routines are contained in @file{dependence.c}. generic loop analysis and manipulation code. Initialization and finalization
This pass is seriously out-of-date and is supposed to be replaced by of loop structures is handled by @file{loop-init.c}.
a new one described below in near future. A loop invariant motion pass is implemented in @file{loop-invariant.c}.
Basic block level optimizations---unrolling, peeling and unswitching loops---
A second loop optimization pass takes care of basic block level are implemented in @file{loop-unswitch.c} and @file{loop-unroll.c}.
optimizations---unrolling, peeling and unswitching loops. The source Replacing of the exit condition of loops by special machine-dependent
files are @file{cfgloopanal.c} and @file{cfgloopmanip.c} containing instructions is handled by @file{loop-doloop.c}.
generic loop analysis and manipulation code, @file{loop-init.c} with
initialization and finalization code, @file{loop-unswitch.c} for loop
unswitching and @file{loop-unroll.c} for loop unrolling and peeling.
It also contains a separate loop invariant motion pass implemented in
@file{loop-invariant.c}.
@item Jump bypassing @item Jump bypassing
......
...@@ -564,7 +564,6 @@ decode_options (unsigned int argc, const char **argv) ...@@ -564,7 +564,6 @@ decode_options (unsigned int argc, const char **argv)
flag_gcse = 1; flag_gcse = 1;
flag_expensive_optimizations = 1; flag_expensive_optimizations = 1;
flag_ipa_type_escape = 1; flag_ipa_type_escape = 1;
flag_strength_reduce = 1;
flag_rerun_cse_after_loop = 1; flag_rerun_cse_after_loop = 1;
flag_caller_saves = 1; flag_caller_saves = 1;
flag_peephole2 = 1; flag_peephole2 = 1;
...@@ -1083,6 +1082,12 @@ common_handle_option (size_t scode, const char *arg, int value, ...@@ -1083,6 +1082,12 @@ common_handle_option (size_t scode, const char *arg, int value,
warning (0, "-f[no-]force-mem is nop and option will be removed in 4.2"); warning (0, "-f[no-]force-mem is nop and option will be removed in 4.2");
break; break;
case OPT_floop_optimize:
case OPT_frerun_loop_opt:
case OPT_fstrength_reduce:
/* These are no-ops, preserved for backward compatability. */
break;
default: default:
/* If the flag was handled in a standard way, assume the lack of /* If the flag was handled in a standard way, assume the lack of
processing here is intentional. */ processing here is intentional. */
......
2006-02-26 Zdenek Dvorak <dvorakz@suse.cz>
* gcc.target/i386/20000614-2.c: Do not use -fno-strength-reduce.
* gcc.dg/20030324-1.c: Do not use -fstrength-reduce.
2006-02-26 Richard Guenther <rguenther@suse.de> 2006-02-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/26421 PR tree-optimization/26421
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O -fstrength-reduce -fstrict-aliasing -fgcse" } */ /* { dg-options "-O -fstrict-aliasing -fgcse" } */
/* PR optimization/10087 */ /* PR optimization/10087 */
/* Contributed by Peter van Hoof <p.van-hoof@qub.ac.uk> */ /* Contributed by Peter van Hoof <p.van-hoof@qub.ac.uk> */
......
/* { dg-do run { target i?86-*-* x86_64-*-*} } */ /* { dg-do run { target i?86-*-* x86_64-*-*} } */
/* { dg-options "-O2 -fno-strength-reduce" } */ /* { dg-options "-O2" } */
extern void abort (void); extern void abort (void);
extern void exit (int); extern void exit (int);
......
...@@ -416,7 +416,7 @@ tree_ssa_loop_prefetch (void) ...@@ -416,7 +416,7 @@ tree_ssa_loop_prefetch (void)
static bool static bool
gate_tree_ssa_loop_prefetch (void) gate_tree_ssa_loop_prefetch (void)
{ {
return flag_prefetch_loop_arrays == 1; return flag_prefetch_loop_arrays != 0;
} }
struct tree_opt_pass pass_loop_prefetch = struct tree_opt_pass pass_loop_prefetch =
......
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