diff options
| author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-18 21:54:53 +0000 |
|---|---|---|
| committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-18 21:54:53 +0000 |
| commit | 8e7b8d2af1ceae976fcb8a74419f64322f9dcd3c (patch) | |
| tree | a1454d32f30953d3df17ed9dde7a3701bf9b1dfc | |
| parent | c319a672436c4a756625677bcfe127e8a641b2ac (diff) | |
| download | ppe42-gcc-8e7b8d2af1ceae976fcb8a74419f64322f9dcd3c.tar.gz ppe42-gcc-8e7b8d2af1ceae976fcb8a74419f64322f9dcd3c.zip | |
* tree-cfg.c (thread_jumps): Fix updating of the profile.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87709 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 2 | ||||
| -rw-r--r-- | gcc/tree-cfg.c | 26 |
2 files changed, 18 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64a20e65d9a..36183a7d5a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,7 @@ 2004-09-18 Jan Hubicka <jh@suse.cz> + * tree-cfg.c (thread_jumps): Fix updating of the profile. + * tree-optimize.c (tree_rest_of_compilation): Kill forgotten verify_cgraph call. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 69c8b2587f7..37b57102f63 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3832,7 +3832,7 @@ static bool thread_jumps (void) { edge e, next, last, old; - basic_block bb, dest, tmp, old_dest, dom; + basic_block bb, dest, tmp, old_dest, curr, dom; tree phi; int arg; bool retval = false; @@ -3891,15 +3891,6 @@ 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. */ @@ -3936,6 +3927,21 @@ thread_jumps (void) old_dest = e->dest; e = redirect_edge_and_branch (e, dest); + /* Update the profile. */ + if (profile_status != PROFILE_ABSENT) + for (curr = old_dest; curr != dest; curr = curr->succ->dest) + { + curr->frequency -= freq; + if (curr->frequency < 0) + curr->frequency = 0; + curr->count -= count; + if (curr->count < 0) + curr->count = 0; + curr->succ->count -= count; + if (curr->succ->count < 0) + curr->succ->count = 0; + } + if (!old) { /* Update PHI nodes. We know that the new argument should |

