From 4cad6dba074f9325e3bc0c4fa80e7646cb50088a Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Wed, 3 Feb 2010 12:36:27 +0000 Subject: [PATCH] invoke.texi: Fix name of sched1 dump. * doc/invoke.texi: Fix name of sched1 dump. * opts.c (decode_options): Set flag_tree_switch_conversion only conditionally on optimize >= 2. * gcse.c: Assorted comment fixes in pass description. From-SVN: r156466 --- gcc/ChangeLog | 9 +++++++++ gcc/doc/invoke.texi | 2 +- gcc/gcse.c | 28 +++++----------------------- gcc/opts.c | 2 +- 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d36c7cf43ae..62f96ffc251 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2010-02-03 Steven Bosscher + + * doc/invoke.texi: Fix name of sched1 dump. + + * opts.c (decode_options): Set flag_tree_switch_conversion + only conditionally on optimize >= 2. + + * gcse.c: Assorted comment fixes in pass description. + 2010-02-03 Anthony Green * config/moxie/moxie.c (moxie_asm_trampoline_template): Introduce diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 07dd7624e6f..e6a1367de9b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5397,7 +5397,7 @@ On targets that use instruction scheduling, this option controls the amount of debugging output the scheduler prints. This information is written to standard error, unless @option{-fdump-rtl-sched1} or @option{-fdump-rtl-sched2} is specified, in which case it is output -to the usual dump listing file, @file{.sched} or @file{.sched2} +to the usual dump listing file, @file{.sched1} or @file{.sched2} respectively. However for @var{n} greater than nine, the output is always printed to standard error. diff --git a/gcc/gcse.c b/gcc/gcse.c index 6c7cc6b2640..432e34d478e 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -171,20 +171,8 @@ along with GCC; see the file COPYING3. If not see #include "dbgcnt.h" #include "target.h" -/* Propagate flow information through back edges and thus enable PRE's - moving loop invariant calculations out of loops. - - Originally this tended to create worse overall code, but several - improvements during the development of PRE seem to have made following - back edges generally a win. - - Note much of the loop invariant code motion done here would normally - be done by loop.c, which has more heuristics for when to move invariants - out of loops. At some point we might need to move some of those - heuristics into gcse.c. */ - /* We support GCSE via Partial Redundancy Elimination. PRE optimizations - are a superset of those done by GCSE. + are a superset of those done by classic GCSE. We perform the following steps: @@ -199,8 +187,6 @@ along with GCC; see the file COPYING3. If not see conditional jumps if the condition can be computed from a value of an incoming edge. - 5) Perform store motion. - Two passes of copy/constant propagation are done because the first one enables more GCSE and the second one helps to clean up the copies that GCSE creates. This is needed more for PRE than for Classic because Classic @@ -212,18 +198,14 @@ along with GCC; see the file COPYING3. If not see (set (pseudo-reg) (expression)). Function want_to_gcse_p says what these are. - In addition, expressions in REG_EQUAL notes are candidates for GXSE-ing. + In addition, expressions in REG_EQUAL notes are candidates for GCSE-ing. This allows PRE to hoist expressions that are expressed in multiple insns, - such as comprex address calculations (e.g. for PIC code, or loads with a - high part and as lowe part). + such as complex address calculations (e.g. for PIC code, or loads with a + high part and a low part). PRE handles moving invariant expressions out of loops (by treating them as partially redundant). - Eventually it would be nice to replace cse.c/gcse.c with SSA (static single - assignment) based GVN (global value numbering). L. T. Simpson's paper - (Rice University) on value numbering is a useful reference for this. - ********************** We used to support multiple passes but there are diminishing returns in @@ -271,7 +253,7 @@ along with GCC; see the file COPYING3. If not see argue it is not. The number of iterations for the algorithm to converge is typically 2-4 so I don't view it as that expensive (relatively speaking). - PRE GCSE depends heavily on the second CSE pass to clean up the copies + PRE GCSE depends heavily on the second CPROP pass to clean up the copies we create. To make an expression reach the place where it's redundant, the result of the expression is copied to a new register, and the redundant expression is deleted by replacing it with this new register. Classic GCSE diff --git a/gcc/opts.c b/gcc/opts.c index 501deae6ea7..75c2d525bb0 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -898,7 +898,7 @@ decode_options (unsigned int argc, const char **argv) flag_tree_vrp = opt2; flag_tree_builtin_call_dce = opt2; flag_tree_pre = opt2; - flag_tree_switch_conversion = 1; + flag_tree_switch_conversion = opt2; flag_ipa_cp = opt2; flag_ipa_sra = opt2; -- 2.30.2