diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-29 12:31:49 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-29 12:31:49 +0000 |
commit | 2b952e8aac4f6e115e1015cb9c330c4e40663e22 (patch) | |
tree | 787119eeac5076eb70a374cc708ae6c835391eca /gcc/function.c | |
parent | c2bac6b75695a930ef68d2dc72b6ee584ca69150 (diff) | |
download | gcc-2b952e8aac4f6e115e1015cb9c330c4e40663e22.tar.gz |
* function.c (dup_block_and_redirect): Update profile.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index d6e19543753..9efbc3ad270 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5668,6 +5668,15 @@ dup_block_and_redirect (basic_block bb, basic_block copy_bb, rtx before, for (ei = ei_start (bb->preds); (e = ei_safe_edge (ei)); ) if (!bitmap_bit_p (need_prologue, e->src->index)) { + int freq = EDGE_FREQUENCY (e); + copy_bb->count += e->count; + copy_bb->frequency += EDGE_FREQUENCY (e); + e->dest->count -= e->count; + if (e->dest->count < 0) + e->dest->count = 0; + e->dest->frequency -= freq; + if (e->dest->frequency < 0) + e->dest->frequency = 0; redirect_edge_and_branch_force (e, copy_bb); continue; } |