diff options
author | Jan Hubicka <jh@suse.cz> | 2009-11-16 17:06:29 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-11-16 16:06:29 +0000 |
commit | 0d63a7400d9f6f0de9703c20f424df5da1ae3bcf (patch) | |
tree | 67e2fac7c1db371237d730ab058e8d5d1a4d330a /gcc/cgraph.c | |
parent | 3cb9d1d59a14630ef7c7bb6216c719066172ac86 (diff) | |
download | gcc-0d63a7400d9f6f0de9703c20f424df5da1ae3bcf.zip gcc-0d63a7400d9f6f0de9703c20f424df5da1ae3bcf.tar.gz gcc-0d63a7400d9f6f0de9703c20f424df5da1ae3bcf.tar.bz2 |
cgraphbuild.c (compute_call_stmt_bb_frequency): Use proper ENTRY_BLOCK_PTR.
* cgraphbuild.c (compute_call_stmt_bb_frequency): Use proper ENTRY_BLOCK_PTR.
* cgraph.c (cgraph_clone_edge): Avoid freq_scale 0 to completely zero out all
callees.
* cgraphunit.c (verify_cgraph_node): Verify cgraph nodes for frequency and count match.
* ipa-inline.c (update_noncloned_frequencies): New function.
(cgraph_clone_inlined_nodes): Use it.
* tree-inline.c (copy_bb): Fix frequency scaling; output
diagnostic on frequency mismatches to dump file.
(initialize_cfun): Do not scale frequency; fix count scaling;
initialize entry and exit block frequencies; copy profile
info.
(copy_cfg_body): Use frequency_scale as argument;
fix count scaling.
(copy_body): Use frequency_scale as argument.
(expand_call_inline): Compute frequency scale and output diagnostic
to dump file.
(delete_unreachable_blocks_update_callgrah): Remove checking that
has to be done after edge redirection.
(tree_function_versioning): Update initialize_cfun and copy_body call.
From-SVN: r154205
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 840cf29..f2d7609 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1641,8 +1641,12 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n, { struct cgraph_edge *new_edge; gcov_type count = e->count * count_scale / REG_BR_PROB_BASE; - gcov_type freq = e->frequency * (gcov_type) freq_scale / CGRAPH_FREQ_BASE; + gcov_type freq; + /* We do not want to ignore loop nest after frequency drops to 0. */ + if (!freq_scale) + freq_scale = 1; + freq = e->frequency * (gcov_type) freq_scale / CGRAPH_FREQ_BASE; if (freq > CGRAPH_FREQ_MAX) freq = CGRAPH_FREQ_MAX; new_edge = cgraph_create_edge (n, e->callee, call_stmt, count, freq, |