aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-02-19 00:09:28 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-02-18 19:09:28 -0500
commit48aba75b6b84511c3ffb0a38029b69ed9286917b (patch)
treef06f2097d9742791c45ef4547d93d8a47df3a55b
parent3335f1d984358b093678719844d52027ec5d01e1 (diff)
downloadgcc-48aba75b6b84511c3ffb0a38029b69ed9286917b.zip
gcc-48aba75b6b84511c3ffb0a38029b69ed9286917b.tar.gz
gcc-48aba75b6b84511c3ffb0a38029b69ed9286917b.tar.bz2
toplev.c (note_deferral_of_defined_inlined_function): Argument FNDECL may be unused.
* toplev.c (note_deferral_of_defined_inlined_function): Argument FNDECL may be unused. * toplev.c (rest_of_compilation): Don't have CSE skip blocks or follow jumps after first run. If -fexpensive-optimizations rerun CSE after GCSE and iterate until it doesn't change any jumps. From-SVN: r39861
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/toplev.c37
2 files changed, 41 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b64e26..52042ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Sun Feb 18 15:45:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * toplev.c (note_deferral_of_defined_inlined_function): Argument
+ FNDECL may be unused.
+
+ * toplev.c (rest_of_compilation): Don't have CSE skip blocks or
+ follow jumps after first run.
+ If -fexpensive-optimizations rerun CSE after GCSE and iterate until
+ it doesn't change any jumps.
+
Sun Feb 18 17:05:50 2001 Jeffrey A Law (law@cygnus.com)
* Makefile.in (rtlanal.o): Depend on hard-reg-set.h.
@@ -9,6 +19,7 @@ Sun Feb 18 17:05:50 2001 Jeffrey A Law (law@cygnus.com)
(rtx_varies_p, rtx_addr_can_trap_p): Similarly.
Sun Feb 18 15:45:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+>>>>>>> 1.9328
* sibcall.c (optimize_sibling_and_tail_recursive_call): Compare
against last real insn in basic block.
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 6a00107..b76b6ba 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2687,7 +2687,7 @@ note_deferral_of_defined_inline_function (decl)
void
note_outlining_of_inline_function (fndecl)
- tree fndecl;
+ tree fndecl ATTRIBUTE_UNUSED;
{
#ifdef DWARF2_DEBUGGING_INFO
/* The DWARF 2 backend tries to reduce debugging bloat by not emitting
@@ -3004,9 +3004,10 @@ rest_of_compilation (decl)
tem = cse_main (insns, max_reg_num (), 0, rtl_dump_file);
- /* If we are not running the second CSE pass, then we are no longer
- expecting CSE to be run. */
- cse_not_expected = !flag_rerun_cse_after_loop;
+ /* If we are not running more CSE passes, then we are no longer
+ expecting CSE to be run. But always rerun it in a cheap mode. */
+ cse_not_expected = !flag_rerun_cse_after_loop && !flag_gcse;
+ flag_cse_skip_blocks = flag_cse_follow_jumps = 0;
if (tem || optimize > 1)
{
@@ -3105,6 +3106,8 @@ rest_of_compilation (decl)
if (optimize > 0 && flag_gcse)
{
+ int tem2 = 0;
+
timevar_push (TV_GCSE);
open_dump_file (DFI_gcse, decl);
@@ -3112,14 +3115,34 @@ rest_of_compilation (decl)
cleanup_cfg (insns);
tem = gcse_main (insns, rtl_dump_file);
- /* If gcse altered any jumps, rerun jump optimizations to clean
- things up. */
- if (tem)
+ /* If -fexpensive-optimizations, re-run CSE to clean up things done
+ by gcse. */
+ if (flag_expensive_optimizations)
+ {
+ timevar_push (TV_CSE);
+ reg_scan (insns, max_reg_num (), 1);
+ tem2 = cse_main (insns, max_reg_num (), 0, rtl_dump_file);
+ timevar_pop (TV_CSE);
+ cse_not_expected = !flag_rerun_cse_after_loop;
+ }
+
+ /* If gcse or cse altered any jumps, rerun jump optimizations to clean
+ things up. Then possibly re-run CSE again. */
+ while (tem || tem2)
{
+ tem = tem2 = 0;
timevar_push (TV_JUMP);
jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES,
!JUMP_AFTER_REGSCAN);
timevar_pop (TV_JUMP);
+
+ if (flag_expensive_optimizations)
+ {
+ timevar_push (TV_CSE);
+ reg_scan (insns, max_reg_num (), 1);
+ tem2 = cse_main (insns, max_reg_num (), 0, rtl_dump_file);
+ timevar_pop (TV_CSE);
+ }
}
close_dump_file (DFI_gcse, print_rtl, insns);