aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphbuild.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-11-16 16:06:29 +0000
committerJan Hubicka <jh@suse.cz>2009-11-16 16:06:29 +0000
commit2b150233346562b0d1f7f599d2a7b73a6c502afe (patch)
tree67e2fac7c1db371237d730ab058e8d5d1a4d330a /gcc/cgraphbuild.c
parent02bef6338a5eab872f61a42db30be4182488e9e9 (diff)
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@154205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r--gcc/cgraphbuild.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 8423c36b880..0c3bff2f90e 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -109,7 +109,8 @@ reset_inline_failed (struct cgraph_node *node)
int
compute_call_stmt_bb_frequency (tree decl, basic_block bb)
{
- int entry_freq = ENTRY_BLOCK_PTR->frequency;
+ int entry_freq = ENTRY_BLOCK_PTR_FOR_FUNCTION
+ (DECL_STRUCT_FUNCTION (decl))->frequency;
int freq = bb->frequency;
if (profile_status_for_function (DECL_STRUCT_FUNCTION (decl)) == PROFILE_ABSENT)