aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.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/cfgcleanup.c
parent0fc88469ed193c14e05072b3435063f8e11d7d2f (diff)
* 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/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 3ec7d3f3781..f030eabca62 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "df.h"
#include "dce.h"
+#include "dbgcnt.h"
#define FORWARDER_BLOCK_P(BB) ((BB)->flags & BB_FORWARDER_BLOCK)
@@ -2250,6 +2251,9 @@ cleanup_cfg (int mode)
if (mode & CLEANUP_CROSSJUMP)
add_noreturn_fake_exit_edges ();
+ if (!dbg_cnt (cfg_cleanup))
+ return changed;
+
while (try_optimize_cfg (mode))
{
delete_unreachable_blocks (), changed = true;