diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2025-07-07 19:20:25 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2025-07-09 12:20:56 +0200 |
commit | 8bd7504cab6fc3289700c1cdb7d03b5e6e9c6c54 (patch) | |
tree | a88889da809735f8325cf09cc0582e63add6ed36 | |
parent | 4de3524f9e88b7b22bdb481163b05a624f090cf9 (diff) | |
download | gcc-8bd7504cab6fc3289700c1cdb7d03b5e6e9c6c54.zip gcc-8bd7504cab6fc3289700c1cdb7d03b5e6e9c6c54.tar.gz gcc-8bd7504cab6fc3289700c1cdb7d03b5e6e9c6c54.tar.bz2 |
Fix profile scaling in tree-inline.cc:initialize_cfun
initialize_cfun calls
profile_count::adjust_for_ipa_scaling (&num, &den);
but then the result is never used. This patch fixes it. Overall scalling
of entry/exit block is bit sloppy in tree-inline. I see if I can clean it up.
* tree-inline.cc (initialize_cfun): Use num and den for scaling.
-rw-r--r-- | gcc/tree-inline.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc index 7e0ac69..e8fe035 100644 --- a/gcc/tree-inline.cc +++ b/gcc/tree-inline.cc @@ -2888,11 +2888,9 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl, profile_count count) profile_count::adjust_for_ipa_scaling (&num, &den); ENTRY_BLOCK_PTR_FOR_FN (cfun)->count = - ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count.apply_scale (count, - ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count); + ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count.apply_scale (num, den); EXIT_BLOCK_PTR_FOR_FN (cfun)->count = - EXIT_BLOCK_PTR_FOR_FN (src_cfun)->count.apply_scale (count, - ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count); + EXIT_BLOCK_PTR_FOR_FN (src_cfun)->count.apply_scale (num, den); if (src_cfun->eh) init_eh_for_function (); |