aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloopmanip.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-07-16 18:35:00 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-07-16 16:35:00 +0000
commitb2ff44a8ebcc67ba914ce3bd60eafec23da5bff8 (patch)
tree004e79cd85255b597562811eadf6c8f51afc4b5e /gcc/cfgloopmanip.c
parent77ba27b40be89dc62d53e569a1917d4f74b71b25 (diff)
downloadgcc-b2ff44a8ebcc67ba914ce3bd60eafec23da5bff8.zip
gcc-b2ff44a8ebcc67ba914ce3bd60eafec23da5bff8.tar.gz
gcc-b2ff44a8ebcc67ba914ce3bd60eafec23da5bff8.tar.bz2
cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE fixpoint arithmetics.
* cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE fixpoint arithmetics. From-SVN: r250242
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r--gcc/cfgloopmanip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 3f4ff98..f62c829 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -546,8 +546,8 @@ scale_loop_profile (struct loop *loop, profile_probability p,
/* Probability of exit must be 1/iterations. */
freq_delta = EDGE_FREQUENCY (e);
- e->probability = profile_probability::from_reg_br_prob_base
- (REG_BR_PROB_BASE / iteration_bound);
+ e->probability = profile_probability::always ()
+ .apply_scale (1, iteration_bound);
other_e->probability = e->probability.invert ();
freq_delta -= EDGE_FREQUENCY (e);