summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/common.opt18
-rw-r--r--gcc/doc/invoke.texi42
-rw-r--r--gcc/doc/passes.texi23
-rw-r--r--gcc/opts.c7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/20030324-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/20000614-2.c2
-rw-r--r--gcc/tree-ssa-loop.c2
9 files changed, 63 insertions, 55 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1d562dced73..e8c9d83c6d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,20 @@
+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>
PR tree-optimization/26421
diff --git a/gcc/common.opt b/gcc/common.opt
index 4229f147c2c..02ade79d0ab 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -555,6 +555,10 @@ fleading-underscore
Common Report Var(flag_leading_underscore) Init(-1)
Give external symbols a leading underscore
+floop-optimize
+Common
+Does nothing. Preserved for backward compatability.
+
fmath-errno
Common Report Var(flag_errno_math) Init(1)
Set errno after built-in math functions
@@ -659,11 +663,7 @@ Common Report Var(flag_pie,1) VarExists
Generate position-independent code for executables if possible (small mode)
fprefetch-loop-arrays
-Common Report Var(flag_prefetch_loop_arrays,1)
-Generate prefetch instructions, if available, for arrays in loops
-
-fprefetch-loop-arrays-rtl
-Common Report Var(flag_prefetch_loop_arrays,2)
+Common Report Var(flag_prefetch_loop_arrays)
Generate prefetch instructions, if available, for arrays in loops
fprofile
@@ -721,6 +721,10 @@ frerun-cse-after-loop
Common Report Var(flag_rerun_cse_after_loop) Init(2)
Add a common subexpression elimination pass after loop optimizations
+frerun-loop-opt
+Common
+Does nothing. Preserved for backward compatability.
+
frounding-math
Common Report Var(flag_rounding_math)
Disable optimizations that assume default FP rounding behavior
@@ -837,8 +841,8 @@ Common Report RejectNegative Var(flag_stack_protect, 2) VarExists
Use a stack protection method for every function
fstrength-reduce
-Common Report Var(flag_strength_reduce)
-Perform strength reduction optimizations
+Common
+Does nothing. Preserved for backward compatability.
; Nonzero if we should do (language-dependent) alias analysis.
; Typically, this analysis will assume that expressions of certain
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 17efb6c1679..60aaaf70744 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -107,7 +107,7 @@ the directories are searched in the order specified.
Many options have long names starting with @samp{-f} or with
@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
@option{-ffoo} would be @option{-fno-foo}. This manual documents
only one of these two forms, whichever one is not the default.
@@ -321,11 +321,11 @@ Objective-C and Objective-C++ Dialects}.
-funsafe-math-optimizations -funsafe-loop-optimizations -ffinite-math-only @gol
-fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @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
-fregmove -frename-registers @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
-fschedule-insns -fschedule-insns2 @gol
-fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
@@ -335,7 +335,7 @@ Objective-C and Objective-C++ Dialects}.
-fsched2-use-traces -freschedule-modulo-scheduled-loops @gol
-fsection-anchors -fsignaling-nans -fsingle-precision-constant @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
-fsplit-ivs-in-unroller -funswitch-loops @gol
-fvariable-expansion-in-unroller @gol
@@ -4434,8 +4434,7 @@ also turns on the following optimization flags:
-fcse-follow-jumps -fcse-skip-blocks @gol
-fgcse -fgcse-lm @gol
-fexpensive-optimizations @gol
--fstrength-reduce @gol
--frerun-cse-after-loop -frerun-loop-opt @gol
+-frerun-cse-after-loop @gol
-fcaller-saves @gol
-fpeephole2 @gol
-fschedule-insns -fschedule-insns2 @gol
@@ -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
instructions, which include x86, PowerPC, IA-64 and S/390.
-The default is @option{-fbranch-count-reg}, enabled when
-@option{-fstrength-reduce} is enabled.
+The default is @option{-fbranch-count-reg}.
@item -fno-function-cse
@opindex fno-function-cse
@@ -4730,13 +4728,6 @@ instrumentation (and therefore faster execution) and still provides
some protection against outright memory corrupting writes, but allows
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
@opindex fthread-jumps
Perform optimizations where we check to see if a jump branches to a
@@ -5130,9 +5121,9 @@ better job.
@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{-funroll-loops} implies both
-@option{-fstrength-reduce} and @option{-frerun-cse-after-loop}. This
-option makes code larger, and may or may not make it run faster.
+time or upon entry to the loop. @option{-funroll-loops} implies
+@option{-frerun-cse-after-loop}. This option makes code larger,
+and may or may not make it run faster.
@item -funroll-all-loops
@opindex funroll-all-loops
@@ -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.
@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.
-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.
+Disabled at level @option{-Os}.
+
@item -fno-peephole
@itemx -fno-peephole2
@opindex fno-peephole
@@ -5698,15 +5689,6 @@ at level @option{-O1}
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
-@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
@itemx -fdata-sections
@opindex ffunction-sections
diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi
index e2fcc7a5d02..bb6a3f0056d 100644
--- a/gcc/doc/passes.texi
+++ b/gcc/doc/passes.texi
@@ -574,20 +574,15 @@ are in @file{lcm.c}.
@item Loop optimization
-This pass moves constant expressions out of loops, and optionally does
-strength-reduction as well. The pass is located in @file{loop.c}.
-Loop dependency analysis routines are contained in @file{dependence.c}.
-This pass is seriously out-of-date and is supposed to be replaced by
-a new one described below in near future.
-
-A second loop optimization pass takes care of basic block level
-optimizations---unrolling, peeling and unswitching loops. The source
-files are @file{cfgloopanal.c} and @file{cfgloopmanip.c} containing
-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}.
+This pass performs several loop related optimizations.
+The source files @file{cfgloopanal.c} and @file{cfgloopmanip.c} contain
+generic loop analysis and manipulation code. Initialization and finalization
+of loop structures is handled by @file{loop-init.c}.
+A loop invariant motion pass is implemented in @file{loop-invariant.c}.
+Basic block level optimizations---unrolling, peeling and unswitching loops---
+are implemented in @file{loop-unswitch.c} and @file{loop-unroll.c}.
+Replacing of the exit condition of loops by special machine-dependent
+instructions is handled by @file{loop-doloop.c}.
@item Jump bypassing
diff --git a/gcc/opts.c b/gcc/opts.c
index ce0a5a92a00..d804761cfd2 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -564,7 +564,6 @@ decode_options (unsigned int argc, const char **argv)
flag_gcse = 1;
flag_expensive_optimizations = 1;
flag_ipa_type_escape = 1;
- flag_strength_reduce = 1;
flag_rerun_cse_after_loop = 1;
flag_caller_saves = 1;
flag_peephole2 = 1;
@@ -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");
break;
+ case OPT_floop_optimize:
+ case OPT_frerun_loop_opt:
+ case OPT_fstrength_reduce:
+ /* These are no-ops, preserved for backward compatability. */
+ break;
+
default:
/* If the flag was handled in a standard way, assume the lack of
processing here is intentional. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 81f9b5e7c1e..4d272f7de4c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR tree-optimization/26421
diff --git a/gcc/testsuite/gcc.dg/20030324-1.c b/gcc/testsuite/gcc.dg/20030324-1.c
index f141bafa927..67db669fda2 100644
--- a/gcc/testsuite/gcc.dg/20030324-1.c
+++ b/gcc/testsuite/gcc.dg/20030324-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O -fstrength-reduce -fstrict-aliasing -fgcse" } */
+/* { dg-options "-O -fstrict-aliasing -fgcse" } */
/* PR optimization/10087 */
/* Contributed by Peter van Hoof <p.van-hoof@qub.ac.uk> */
diff --git a/gcc/testsuite/gcc.target/i386/20000614-2.c b/gcc/testsuite/gcc.target/i386/20000614-2.c
index eb30fc6cd55..9eba76149dc 100644
--- a/gcc/testsuite/gcc.target/i386/20000614-2.c
+++ b/gcc/testsuite/gcc.target/i386/20000614-2.c
@@ -1,5 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-*} } */
-/* { dg-options "-O2 -fno-strength-reduce" } */
+/* { dg-options "-O2" } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index e128c368084..8657dac1882 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -416,7 +416,7 @@ tree_ssa_loop_prefetch (void)
static bool
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 =