cfghooks.c (split_block): Set probability and count of the new edge.
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Thu, 29 Jan 2004 12:55:25 +0000 (13:55 +0100)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Thu, 29 Jan 2004 12:55:25 +0000 (12:55 +0000)
* cfghooks.c (split_block): Set probability and count of the
new edge.

From-SVN: r76858

gcc/ChangeLog
gcc/cfghooks.c

index aaf39f6..3d58047 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-29  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+       * cfghooks.c (split_block): Set probability and count of the
+       new edge.
+
 2005-01-29  Josef Zlomek  <zlomekj@suse.cz>
 
        * dwarf2out.c (struct die_struct): Added field decl_id.
index fd361c5..37c1c60 100644 (file)
@@ -286,6 +286,7 @@ edge
 split_block (basic_block bb, void *i)
 {
   basic_block new_bb;
+  edge e;
 
   if (!cfg_hooks->split_block)
     internal_error ("%s does not support split_block.", cfg_hooks->name);
@@ -304,7 +305,11 @@ split_block (basic_block bb, void *i)
       set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
     }
 
-  return make_edge (bb, new_bb, EDGE_FALLTHRU);
+  e = make_edge (bb, new_bb, EDGE_FALLTHRU);
+  e->probability = REG_BR_PROB_BASE;
+  e->count = bb->count;
+
+  return e;
 }
 
 /* Splits block BB just after labels.  The newly created edge is returned.  */