aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-unswitch.c
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2013-05-02 13:20:47 +0000
committerTeresa Johnson <tejohnson@gcc.gnu.org>2013-05-02 13:20:47 +0000
commit8b47039cde38d852471193033965e9d3e40e97bc (patch)
treee9eaf4c390a4ad7d8e3e0600f9736eb3868af2dc /gcc/loop-unswitch.c
parentda65928c1d160f7e9ba156c5f189bca40f0527d6 (diff)
downloadgcc-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/loop-unswitch.c')
-rw-r--r--gcc/loop-unswitch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c
index e5f1bdc..213e74d 100644
--- a/gcc/loop-unswitch.c
+++ b/gcc/loop-unswitch.c
@@ -436,12 +436,10 @@ unswitch_loop (struct loop *loop, basic_block unswitch_on, rtx cond, rtx cinsn)
emit_insn_after (seq, BB_END (switch_bb));
e = make_edge (switch_bb, true_edge->dest, 0);
e->probability = prob;
- /* Update to use apply_probability(). */
- e->count = latch_edge->count * prob / REG_BR_PROB_BASE;
+ e->count = apply_probability (latch_edge->count, prob);
e = make_edge (switch_bb, FALLTHRU_EDGE (unswitch_on)->dest, EDGE_FALLTHRU);
e->probability = false_edge->probability;
- /* Update to use apply_probability(). */
- e->count = latch_edge->count * (false_edge->probability) / REG_BR_PROB_BASE;
+ e->count = apply_probability (latch_edge->count, false_edge->probability);
if (irred_flag)
{