aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-01-16 01:06:33 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-01-16 01:06:33 +0000
commita013431213f7f27e2866350c9aaea8f12046d81c (patch)
tree2ecda5f756d588f0c8e2d12fbf3426b2b6eb164e /gcc/toplev.c
parent6b543e86f4a765f6a0b7be90e393b9a772c22a52 (diff)
downloadgcc-a013431213f7f27e2866350c9aaea8f12046d81c.zip
gcc-a013431213f7f27e2866350c9aaea8f12046d81c.tar.gz
gcc-a013431213f7f27e2866350c9aaea8f12046d81c.tar.bz2
gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps and bypass_jumps flags...
* gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps and bypass_jumps flags instead of just alter_jumps. (gcse_main): Update calls to one_cprop_pass, disabling bypassing. (bypass_jumps): New function to perform separate jump bypassing pass. * rtl.h (bypass_jumps): Add function prototype. * timevar.def (TV_BYPASS): New timing variable. * toplev.c (enum dump_file_index): Add new entry DFI_bypass. (dump_file): New entry for the bypass RTL dump file. (rest_of_compilation): Insert new jump bypassing optimization pass after loop. * doc/passes.texi: Document new pass. From-SVN: r61374
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 554f471..b860500 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -232,6 +232,7 @@ enum dump_file_index
DFI_addressof,
DFI_gcse,
DFI_loop,
+ DFI_bypass,
DFI_cfg,
DFI_bp,
DFI_ce1,
@@ -281,6 +282,7 @@ static struct dump_file_info dump_file[DFI_MAX] =
{ "addressof", 'F', 0, 0, 0 },
{ "gcse", 'G', 1, 0, 0 },
{ "loop", 'L', 1, 0, 0 },
+ { "bypass", 'G', 1, 0, 0 }, /* Yes, duplicate enable switch. */
{ "cfg", 'f', 1, 0, 0 },
{ "bp", 'b', 1, 0, 0 },
{ "ce1", 'C', 1, 0, 0 },
@@ -2964,6 +2966,32 @@ rest_of_compilation (decl)
ggc_collect ();
}
+ /* Perform jump bypassing and control flow optimizations. */
+ if (optimize > 0 && flag_gcse)
+ {
+ timevar_push (TV_BYPASS);
+ open_dump_file (DFI_bypass, decl);
+
+ cleanup_cfg (CLEANUP_EXPENSIVE);
+ tem = bypass_jumps (rtl_dump_file);
+
+ if (tem)
+ {
+ rebuild_jump_labels (insns);
+ cleanup_cfg (CLEANUP_EXPENSIVE);
+ delete_trivially_dead_insns (insns, max_reg_num ());
+ }
+
+ close_dump_file (DFI_bypass, print_rtl_with_bb, insns);
+ timevar_pop (TV_BYPASS);
+
+ ggc_collect ();
+
+#ifdef ENABLE_CHECKING
+ verify_flow_info ();
+#endif
+ }
+
/* Do control and data flow analysis; wrote some of the results to
the dump file. */