diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-23 04:09:46 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-23 04:09:46 +0000 |
commit | c8dfa741fe716a1d261cc3946510b4d2c6fdcf27 (patch) | |
tree | 0d932e098851549e39ec9a89ee17784215970080 /gcc/cfghooks.c | |
parent | e7dd2c8c57d9ae44640c65ae40446478f319a407 (diff) | |
download | gcc-c8dfa741fe716a1d261cc3946510b4d2c6fdcf27.tar.gz |
* cfghooks.c (make_forwarder_block): Decrement count on fallthru edge
when redirecting back edges.
* cfghooks.c (split_block): Call make_single_succ_edge so that edge
count/probability are set correctly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r-- | gcc/cfghooks.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 29f5dfd1695..bd67a21dc93 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -321,7 +321,7 @@ split_block (basic_block bb, void *i) set_immediate_dominator (CDI_DOMINATORS, new_bb, bb); } - return make_edge (bb, new_bb, EDGE_FALLTHRU); + return make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU); } /* Splits block BB just after labels. The newly created edge is returned. */ @@ -566,6 +566,9 @@ make_forwarder_block (basic_block bb, bool (*redirect_edge_p) (edge), dummy->frequency = 0; if (dummy->count < 0) dummy->count = 0; + fallthru->count -= e->count; + if (fallthru->count < 0) + fallthru->count = 0; jump = redirect_edge_and_branch_force (e, bb); if (jump) |