From 63a730710434c6606c81ee5bf56f26818c0aef54 Mon Sep 17 00:00:00 2001 From: David Li Date: Thu, 4 Aug 2011 06:22:15 +0000 Subject: [PATCH] Fix a bug in cfg fixup From-SVN: r177313 --- gcc/ChangeLog | 5 +++++ gcc/tree-optimize.c | 4 ++++ 2 files changed, 9 insertions(+) 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 -- 2.30.2