From: David Li Date: Thu, 4 Aug 2011 06:22:15 +0000 (+0000) Subject: Fix a bug in cfg fixup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63a730710434c6606c81ee5bf56f26818c0aef54;p=gcc.git Fix a bug in cfg fixup From-SVN: r177313 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1f846100b8e..58daaa31c45 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-08-03 David Li + + * tree-optimize.c (execute_fixup_cfg): Fix up entry + outgoing edge counts after inlining. + 2011-08-03 David Li * profile.c (compute_branch_probabilities): Compute diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 411886cacb6..5479d9026a6 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -256,6 +256,10 @@ execute_fixup_cfg (void) EXIT_BLOCK_PTR->count = (EXIT_BLOCK_PTR->count * count_scale + REG_BR_PROB_BASE / 2) / REG_BR_PROB_BASE; + FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs) + e->count = (e->count * count_scale + + REG_BR_PROB_BASE / 2) / REG_BR_PROB_BASE; + FOR_EACH_BB (bb) { bb->count = (bb->count * count_scale