diff options
author | Teresa Johnson <tejohnson@google.com> | 2013-05-02 13:20:47 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@gcc.gnu.org> | 2013-05-02 13:20:47 +0000 |
commit | 8b47039cde38d852471193033965e9d3e40e97bc (patch) | |
tree | e9eaf4c390a4ad7d8e3e0600f9736eb3868af2dc /gcc/ipa-inline-analysis.c | |
parent | da65928c1d160f7e9ba156c5f189bca40f0527d6 (diff) | |
download | gcc-8b47039cde38d852471193033965e9d3e40e97bc.zip gcc-8b47039cde38d852471193033965e9d3e40e97bc.tar.gz gcc-8b47039cde38d852471193033965e9d3e40e97bc.tar.bz2 |
Follow-on patch to r197595 to complete the replacement of truncating divides in...
Follow-on patch to r197595 to complete the replacement of truncating divides
in profile scaling code with rounding divide equivalents using helper routines
in basic-block.h.
In addition to bootstrap and profiledbootstrap builds and tests (with and
without LTO), I built and tested performance of the SPEC cpu2006 benchmarks
with FDO on a Nehalem system. I didn't see any performance changes that
looked significant.
2013-05-02 Teresa Johnson <tejohnson@google.com>
* loop-unswitch.c (unswitch_loop): Use helper routines with rounding
divides.
* cfg.c (update_bb_profile_for_threading): Ditto.
* tree-inline.c (copy_bb): Ditto.
(copy_edges_for_bb): Ditto.
(initialize_cfun): Ditto.
(copy_cfg_body): Ditto.
(expand_call_inline): Ditto.
* ipa-inline-analysis.c (estimate_edge_size_and_time): Ditto.
(estimate_node_size_and_time): Ditto.
(inline_merge_summary): Ditto.
* cgraphclones.c (cgraph_clone_edge): Ditto.
(cgraph_clone_node): Ditto.
* sched-rgn.c (compute_dom_prob_ps): Ditto.
(compute_trg_info): Ditto.
From-SVN: r198532
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 138433c..8d66325 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -2790,8 +2790,7 @@ estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *time, && hints && cgraph_maybe_hot_edge_p (e)) *hints |= INLINE_HINT_indirect_call; *size += call_size * INLINE_SIZE_SCALE; - /* Update to use apply_probability(). */ - *time += call_time * prob / REG_BR_PROB_BASE + *time += apply_probability ((gcov_type) call_time, prob) * e->frequency * (INLINE_TIME_SCALE / CGRAPH_FREQ_BASE); if (*time > MAX_TIME * INLINE_TIME_SCALE) *time = MAX_TIME * INLINE_TIME_SCALE; @@ -2901,8 +2900,7 @@ estimate_node_size_and_time (struct cgraph_node *node, inline_param_summary); gcc_checking_assert (prob >= 0); gcc_checking_assert (prob <= REG_BR_PROB_BASE); - /* Update to use apply_probability(). */ - time += ((gcov_type) e->time * prob) / REG_BR_PROB_BASE; + time += apply_probability ((gcov_type) e->time, prob); } if (time > MAX_TIME * INLINE_TIME_SCALE) time = MAX_TIME * INLINE_TIME_SCALE; @@ -3311,8 +3309,7 @@ inline_merge_summary (struct cgraph_edge *edge) int prob = predicate_probability (callee_info->conds, &e->predicate, clause, es->param); - /* Update to use apply_probability(). */ - add_time = ((gcov_type) add_time * prob) / REG_BR_PROB_BASE; + add_time = apply_probability ((gcov_type) add_time, prob); if (add_time > MAX_TIME * INLINE_TIME_SCALE) add_time = MAX_TIME * INLINE_TIME_SCALE; if (prob != REG_BR_PROB_BASE |