summaryrefslogtreecommitdiff
path: root/gcc/tree-optimize.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-11-23 21:01:29 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2009-11-23 20:01:29 +0000
commit43558bcc9df59fc2a1d611030a936931e92cc6e5 (patch)
treec9663c118c473b5fc50a9f3781ed3452e9f94056 /gcc/tree-optimize.c
parentbf92569441a43c2d67fa9fa0c11f65fe7ca96bb7 (diff)
downloadgcc-43558bcc9df59fc2a1d611030a936931e92cc6e5.tar.gz
ipa-cp.c (ipcp_compute_node_scale): Work around completely wrong profile updates.
* ipa-cp.c (ipcp_compute_node_scale): Work around completely wrong profile updates. * predict.c (counts_to_freqs): Be expected for ENTRY/EXIT block having largest frequency. * ira-live.c (ira_implicitly_set_insn_hard_regs): Silecne used uninitalized warning. * tree-optimize.c (execute_fixup_cfg): Rescale entry and exit block frequencies. From-SVN: r154462
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r--gcc/tree-optimize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 61d687daa13..778658a70b4 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -255,6 +255,10 @@ execute_fixup_cfg (void)
else
count_scale = REG_BR_PROB_BASE;
+ ENTRY_BLOCK_PTR->count = cgraph_node (current_function_decl)->count;
+ EXIT_BLOCK_PTR->count = (EXIT_BLOCK_PTR->count * count_scale
+ + REG_BR_PROB_BASE / 2) / REG_BR_PROB_BASE;
+
FOR_EACH_BB (bb)
{
bb->count = (bb->count * count_scale