tree-eh.c (lower_resx): Sanitize profile.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 5 Feb 2017 18:13:22 +0000 (19:13 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 5 Feb 2017 18:13:22 +0000 (18:13 +0000)
* tree-eh.c (lower_resx): Sanitize profile.
(cleanup_empty_eh_move_lp): Likewise.

From-SVN: r245197

gcc/ChangeLog
gcc/tree-eh.c

index a8c6be100e2ec74c72a9d2c098f6573e924c2859..62b1c3be287db6d3b35bba8bf611df93b62ccced 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-eh.c (lower_resx): Sanitize profile.
+       (cleanup_empty_eh_move_lp): Likewise.
+
 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
 
        PR tree-ssa/79347
index 45e6b9e4ebb3973e1bcd6267a512457c37d4044b..42fe9dfbbf8c9b2cdc76264255b111932819680d 100644 (file)
@@ -3248,6 +3248,8 @@ lower_resx (basic_block bb, gresx *stmt,
          e = single_succ_edge (bb);
          gcc_assert (e->flags & EDGE_EH);
          e->flags = (e->flags & ~EDGE_EH) | EDGE_FALLTHRU;
+         e->probability = REG_BR_PROB_BASE;
+         e->count = bb->count;
 
          /* If there are no more EH users of the landing pad, delete it.  */
          FOR_EACH_EDGE (e, ei, e->dest->preds)
@@ -4268,6 +4270,7 @@ cleanup_empty_eh_move_lp (basic_block bb, edge e_out,
   /* Clean up E_OUT for the fallthru.  */
   e_out->flags = (e_out->flags & ~EDGE_EH) | EDGE_FALLTHRU;
   e_out->probability = REG_BR_PROB_BASE;
+  e_out->count = e_out->src->count;
 }
 
 /* A subroutine of cleanup_empty_eh.  Handle more complex cases of