aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-09-10 10:58:47 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-10 08:58:47 +0000
commitb829f3fac7e1c736df642ace45589e8d24ae2731 (patch)
treea9f89767bf8754a717564aa16cdeed6f7574c14f /gcc/tree-cfg.c
parent229031d0e2ec3c74d8dcc0abe20b2906026fd978 (diff)
downloadgcc-b829f3fac7e1c736df642ace45589e8d24ae2731.zip
gcc-b829f3fac7e1c736df642ace45589e8d24ae2731.tar.gz
gcc-b829f3fac7e1c736df642ace45589e8d24ae2731.tar.bz2
tree-ssa-dce.c (remove_dead_stmt): Update profile.
* tree-ssa-dce.c (remove_dead_stmt): Update profile. * tree-split_edge.c (tree_split_edge): Likewise. (thread_jumps): Likewise. From-SVN: r87284
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 9452dff..14f7d1d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3018,7 +3018,11 @@ tree_split_edge (edge edge_in)
after_bb = edge_in->src;
new_bb = create_empty_bb (after_bb);
+ new_bb->frequency = EDGE_FREQUENCY (edge_in);
+ new_bb->count = edge_in->count;
new_edge = make_edge (new_bb, dest, EDGE_FALLTHRU);
+ new_edge->probability = REG_BR_PROB_BASE;
+ new_edge->count = edge_in->count;
/* Find all the PHI arguments on the original edge, and change them to
the new edge. Do it before redirection, so that the argument does not
@@ -3852,6 +3856,8 @@ thread_jumps (void)
forwardable. */
for (e = bb->succ; e; e = next)
{
+ int freq;
+ gcov_type count;
next = e->succ_next;
/* If the edge is abnormal or its destination is not
@@ -3860,6 +3866,9 @@ thread_jumps (void)
|| !tree_forwarder_block_p (e->dest))
continue;
+ count = e->count;
+ freq = EDGE_FREQUENCY (e);
+
/* Now walk through as many forwarder block as possible to
find the ultimate destination we want to thread our jump
to. */
@@ -3879,6 +3888,15 @@ thread_jumps (void)
break;
bb_ann (dest)->forwardable = 0;
+ dest->frequency -= freq;
+ if (dest->frequency < 0)
+ dest->frequency = 0;
+ dest->count -= count;
+ if (dest->count < 0)
+ dest->count = 0;
+ dest->succ->count -= count;
+ if (dest->succ->count < 0)
+ dest->succ->count = 0;
}
/* Reset the forwardable marks to 1. */