From: Jan Hubicka Date: Sun, 16 Jul 2017 16:35:00 +0000 (+0200) Subject: cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE fixpoint arithmetics. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2ff44a8ebcc67ba914ce3bd60eafec23da5bff8;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 849de45f2c8..ccceea51091 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-07-16 Jan Hubicka + + * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE + fixpoint arithmetics. + 2017-07-16 Jan Hubicka * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 3f4ff988c74..f62c829bd5f 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);