diff options
author | David Edelsohn <edelsohn@gnu.org> | 2008-02-26 19:21:21 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2008-02-26 14:21:21 -0500 |
commit | 7d817ebc0d283639a4659b388c074aff1accc3b3 (patch) | |
tree | d3d1d41238e71fa67b722a736ee63be9e08201fe /gcc/dse.c | |
parent | a19b7d465087d3105de11c32ed67fcae81bedfe7 (diff) | |
download | gcc-7d817ebc0d283639a4659b388c074aff1accc3b3.zip gcc-7d817ebc0d283639a4659b388c074aff1accc3b3.tar.gz gcc-7d817ebc0d283639a4659b388c074aff1accc3b3.tar.bz2 |
dbgcnt.def (cfg_cleanup, [...]): New counters.
* 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.
From-SVN: r132684
Diffstat (limited to 'gcc/dse.c')
-rw-r--r-- | gcc/dse.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -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 */ |