From 102a9b43207e6fb7d427e23382a1f9b148829b34 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 21 Dec 2015 20:09:08 -0700 Subject: [PATCH] dbgcnt.def (dom_unreachable_edges): New debug counter. * dbgcnt.def (dom_unreachable_edges): New debug counter. * tree-ssa-dom.c: Include dbgcnt.h (dom_opt_dom_walker::before_dom_children): Handle the new counter. From-SVN: r231896 --- gcc/ChangeLog | 6 ++++++ gcc/dbgcnt.def | 1 + gcc/tree-ssa-dom.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1f1d69a1d6..9e3ab5aaf92 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-12-21 Jeff Law + + * dbgcnt.def (dom_unreachable_edges): New debug counter. + * tree-ssa-dom.c: Include dbgcnt.h + (dom_opt_dom_walker::before_dom_children): Handle the new counter. + 2015-12-21 Andrew Pinski * config/aarch64/aarch64-option-extensions.def (LSE): Change diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 583b16b0f4f..65f18fbfdf4 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -192,3 +192,4 @@ DEBUG_COUNTER (treepre_insert) DEBUG_COUNTER (tree_sra) DEBUG_COUNTER (vect_loop) DEBUG_COUNTER (vect_slp) +DEBUG_COUNTER (dom_unreachable_edges) diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 88fc517900c..1b689a05126 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-dom.h" #include "gimplify.h" #include "tree-cfgcleanup.h" +#include "dbgcnt.h" /* This file implements optimizations on the dominator tree. */ @@ -1369,6 +1370,9 @@ dom_opt_dom_walker::before_dom_children (basic_block bb) /* Now prepare to process dominated blocks. */ record_edge_info (bb); cprop_into_successor_phis (bb, m_const_and_copies); + if (taken_edge && !dbg_cnt (dom_unreachable_edges)) + return NULL; + return taken_edge; } -- 2.30.2