aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphbuild.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-11-16 17:06:29 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2009-11-16 16:06:29 +0000
commit0d63a7400d9f6f0de9703c20f424df5da1ae3bcf (patch)
tree67e2fac7c1db371237d730ab058e8d5d1a4d330a /gcc/cgraphbuild.c
parent3cb9d1d59a14630ef7c7bb6216c719066172ac86 (diff)
downloadgcc-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/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 8423c36..0c3bff2 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)