summaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.c
diff options
context:
space:
mode:
authortejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-02 13:20:47 +0000
committertejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-02 13:20:47 +0000
commit7007400071d3afc1525ca1691c93ae77c509349f (patch)
treee9eaf4c390a4ad7d8e3e0600f9736eb3868af2dc /gcc/sched-rgn.c
parent4817649a7d71cac4236204ad8eecc15dee6bd6d9 (diff)
downloadgcc-7007400071d3afc1525ca1691c93ae77c509349f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198532 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r--gcc/sched-rgn.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 6eb00e93adc..3f5b4ba178b 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -1441,8 +1441,7 @@ compute_dom_prob_ps (int bb)
FOR_EACH_EDGE (out_edge, out_ei, in_edge->src->succs)
bitmap_set_bit (pot_split[bb], EDGE_TO_BIT (out_edge));
- /* Update to use apply_probability(). */
- prob[bb] += ((prob[pred_bb] * in_edge->probability) / REG_BR_PROB_BASE);
+ prob[bb] += combine_probabilities (prob[pred_bb], in_edge->probability);
}
bitmap_set_bit (dom[bb], bb);
@@ -1515,8 +1514,7 @@ compute_trg_info (int trg)
int tf = prob[trg], cf = prob[i];
/* In CFGs with low probability edges TF can possibly be zero. */
- /* Update to use GCOV_COMPUTE_SCALE. */
- sp->src_prob = (tf ? ((cf * REG_BR_PROB_BASE) / tf) : 0);
+ sp->src_prob = (tf ? GCOV_COMPUTE_SCALE (cf, tf) : 0);
sp->is_valid = (sp->src_prob >= min_spec_prob);
}