From: Richard Biener Date: Fri, 8 Nov 2019 13:16:28 +0000 (+0000) Subject: dbgcnt.def (ivopts_loop): Add. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14df3a17aa243fd58be2aa03f787a2da5c94ae97;p=gcc.git dbgcnt.def (ivopts_loop): Add. 2019-11-08 Richard Biener * dbgcnt.def (ivopts_loop): Add. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Check ivopts_loop before optimizing a loop. From-SVN: r277973 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89bb2040880..b00e473826e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-08 Richard Biener + + * dbgcnt.def (ivopts_loop): Add. + * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Check + ivopts_loop before optimizing a loop. + 2019-11-08 Richard Biener PR ipa/92409 diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 9455506343e..cbd437ea594 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -199,3 +199,4 @@ DEBUG_COUNTER (dom_unreachable_edges) DEBUG_COUNTER (match) DEBUG_COUNTER (store_merging) DEBUG_COUNTER (gimple_unroll) +DEBUG_COUNTER (ivopts_loop) diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 5938cfec08b..ceaa327e408 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -131,6 +131,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-address.h" #include "builtins.h" #include "tree-vectorizer.h" +#include "dbgcnt.h" /* FIXME: Expressions are expanded to RTL in this pass to determine the cost of different addressing modes. This should be moved to a TBD @@ -8043,6 +8044,9 @@ tree_ssa_iv_optimize (void) /* Optimize the loops starting with the innermost ones. */ FOR_EACH_LOOP (loop, LI_FROM_INNERMOST) { + if (!dbg_cnt (ivopts_loop)) + continue; + if (dump_file && (dump_flags & TDF_DETAILS)) flow_loop_dump (loop, dump_file, NULL, 1);