summaryrefslogtreecommitdiff
path: root/gcc/cfg.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/cfg.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/cfg.c')
-rw-r--r--gcc/cfg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 6405f93f429..9c6c939139c 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -848,8 +848,7 @@ update_bb_profile_for_threading (basic_block bb, int edge_frequency,
/* Compute the probability of TAKEN_EDGE being reached via threaded edge.
Watch for overflows. */
if (bb->frequency)
- /* Update to use GCOV_COMPUTE_SCALE. */
- prob = edge_frequency * REG_BR_PROB_BASE / bb->frequency;
+ prob = GCOV_COMPUTE_SCALE (edge_frequency, bb->frequency);
else
prob = 0;
if (prob > taken_edge->probability)