tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update profile.
authorJan Hubicka <hubicka@ucw.cz>
Fri, 16 Jun 2017 19:01:39 +0000 (21:01 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 16 Jun 2017 19:01:39 +0000 (19:01 +0000)
* tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
profile.
(try_unroll_loop_completely): Fix reporting.

From-SVN: r249275

gcc/ChangeLog
gcc/tree-ssa-loop-ivcanon.c

index eb688d2f37beb6897db40f1b0a8193b9c793d16e..44ef8579998ee3767e06f964353e7a4ec11bd9e6 100644 (file)
@@ -1,3 +1,9 @@
+2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
+       profile.
+       (try_unroll_loop_completely): Fix reporting.
+
 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
 
        * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
index f4ebe4837e09f0b309289e2b80c5591d320e8d8d..82ad59c42530281689091e36e7d8df87d3269d80 100644 (file)
@@ -529,6 +529,8 @@ remove_exits_and_undefined_stmts (struct loop *loop, unsigned int npeeled)
            }
          if (!loop_exit_edge_p (loop, exit_edge))
            exit_edge = EDGE_SUCC (bb, 1);
+         exit_edge->probability = REG_BR_PROB_BASE;
+         exit_edge->count = exit_edge->src->count;
          gcc_checking_assert (loop_exit_edge_p (loop, exit_edge));
          gcond *cond_stmt = as_a <gcond *> (elt->stmt);
          if (exit_edge->flags & EDGE_TRUE_VALUE)
@@ -853,8 +855,9 @@ try_unroll_loop_completely (struct loop *loop,
                     loop->num);
          return false;
        }
-      dump_printf_loc (report_flags, locus,
-                       "loop turned into non-loop; it never loops.\n");
+      if (!n_unroll)
+        dump_printf_loc (report_flags, locus,
+                         "loop turned into non-loop; it never loops.\n");
 
       initialize_original_copy_tables ();
       auto_sbitmap wont_exit (n_unroll + 1);