From 4ff06051cbabbe8e197187acd87a3c1ba139aed4 Mon Sep 17 00:00:00 2001 From: dje Date: Tue, 26 Feb 2008 19:21:21 +0000 Subject: * dbgcnt.def (cfg_cleanup, cprop1, cprop2, dce_fast, dce_ud, dse1, dse2, gcse, if_conversion, if_after_combine, if_after_reload, jump_bypass): New counters. * cfgcleanup.c (cleanup_cfg): Add dbg_cnt. * dce.c (gate_ud_dce): Same. (gate_fast_dce): Same. * dse.c (gate_dse1): New function. (gate_dse2): New function. (gate_dse): Merge results of new gate functions. * gcse.c (gcse_main): Bracket cprop1 and cprop2 with dbg_cnt. (gate_handle_jump_bypass): Add dbg_cnt. (gate_handle_gcse): Add dbg_cnt. * ifcvt.c (gate_handle_if_conversion): Same. (gate_handle_if_after_combine): Same. (gate_handle_if_after_reload): Same. * Makefile.in: Add DBGCNT_H to cfgcleanup.o and ifcvt.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132684 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dse.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'gcc/dse.c') diff --git a/gcc/dse.c b/gcc/dse.c index 2b860187fbe..48df3503b6f 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -540,6 +540,8 @@ static unsigned int current_position; static bool gate_dse (void); +static bool gate_dse1 (void); +static bool gate_dse2 (void); /*---------------------------------------------------------------------------- @@ -3284,13 +3286,27 @@ rest_of_handle_dse (void) static bool gate_dse (void) { - return optimize > 0 && flag_dse; + return gate_dse1 () || gate_dse2 (); +} + +static bool +gate_dse1 (void) +{ + return optimize > 0 && flag_dse + && dbg_cnt (dse1); +} + +static bool +gate_dse2 (void) +{ + return optimize > 0 && flag_dse + && dbg_cnt (dse2); } struct tree_opt_pass pass_rtl_dse1 = { "dse1", /* name */ - gate_dse, /* gate */ + gate_dse1, /* gate */ rest_of_handle_dse, /* execute */ NULL, /* sub */ NULL, /* next */ @@ -3309,7 +3325,7 @@ struct tree_opt_pass pass_rtl_dse1 = struct tree_opt_pass pass_rtl_dse2 = { "dse2", /* name */ - gate_dse, /* gate */ + gate_dse2, /* gate */ rest_of_handle_dse, /* execute */ NULL, /* sub */ NULL, /* next */ -- cgit v1.2.1