summaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-26 19:21:21 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-26 19:21:21 +0000
commit4ff06051cbabbe8e197187acd87a3c1ba139aed4 (patch)
treed3d1d41238e71fa67b722a736ee63be9e08201fe /gcc/dse.c
parent0fc88469ed193c14e05072b3435063f8e11d7d2f (diff)
downloadgcc-4ff06051cbabbe8e197187acd87a3c1ba139aed4.tar.gz
* 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
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c22
1 files changed, 19 insertions, 3 deletions
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 */