diff options
author | Richard Biener <rguenther@suse.de> | 2019-11-07 07:36:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-11-07 07:36:39 +0000 |
commit | 76bc24ff68284d90bc8d334b72c9690382747add (patch) | |
tree | c85c1f3326582892807f553f5c7b90aab66a9c0c | |
parent | f06abe6d75618da127eef0de4231cefd3b24b977 (diff) |
dbgcnt.def (gimple_unroll): New.
2019-11-07 Richard Biener <rguenther@suse.de>
* dbgcnt.def (gimple_unroll): New.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Check
gimple_unroll debug counter before applying transform.
(try_peel_loop): Likewise.
From-SVN: r277907
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/dbgcnt.def | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f5ef703927d..b6db832f9fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-11-07 Richard Biener <rguenther@suse.de> + + * dbgcnt.def (gimple_unroll): New. + * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Check + gimple_unroll debug counter before applying transform. + (try_peel_loop): Likewise. + 2019-11-07 Kwok Cheung Yeung <kcy@codesourcery.com> * ira.c (setup_alloc_regs): Setup no_unit_alloc_regs for diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 7c9daafe35d..9455506343e 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -198,3 +198,4 @@ DEBUG_COUNTER (vect_slp) DEBUG_COUNTER (dom_unreachable_edges) DEBUG_COUNTER (match) DEBUG_COUNTER (store_merging) +DEBUG_COUNTER (gimple_unroll) diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index d38959c3aa2..c505f85f91a 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-cfgcleanup.h" #include "builtins.h" #include "tree-ssa-sccvn.h" +#include "dbgcnt.h" /* Specifies types of loops that may be unrolled. */ @@ -884,6 +885,9 @@ try_unroll_loop_completely (class loop *loop, } } + if (!dbg_cnt (gimple_unroll)) + return false; + initialize_original_copy_tables (); auto_sbitmap wont_exit (n_unroll + 1); if (exit && niter @@ -1074,6 +1078,9 @@ try_peel_loop (class loop *loop, return false; } + if (!dbg_cnt (gimple_unroll)) + return false; + /* Duplicate possibly eliminating the exits. */ initialize_original_copy_tables (); auto_sbitmap wont_exit (npeel + 1); |