predict.c (estimate_bb_frequencies): Initialize the sreal constants once per compilation.

* predict.c (estimate_bb_frequencies): Initialize the sreal
constants once per compilation.

From-SVN: r63607
This commit is contained in:
Richard Earnshaw 2003-03-01 12:51:01 +00:00 committed by Richard Earnshaw
parent 2bcbe1b74a
commit c4f6b78e43
2 changed files with 17 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2003-03-01 Richard Earnshaw <rearnsha@arm.com>
* predict.c (estimate_bb_frequencies): Initialize the sreal
constants once per compilation.
2003-02-28 Richard Henderson <rth@redhat.com>
* toplev.c (flag_eliminate_unused_debug_types): Enable by default.

View File

@ -1173,13 +1173,18 @@ estimate_bb_frequencies (loops)
counts_to_freqs ();
else
{
sreal_init (&real_zero, 0, 0);
sreal_init (&real_one, 1, 0);
sreal_init (&real_br_prob_base, REG_BR_PROB_BASE, 0);
sreal_init (&real_bb_freq_max, BB_FREQ_MAX, 0);
sreal_init (&real_one_half, 1, -1);
sreal_div (&real_inv_br_prob_base, &real_one, &real_br_prob_base);
sreal_sub (&real_almost_one, &real_one, &real_inv_br_prob_base);
static int real_values_initialized = 0;
if (!real_values_initialized)
{
sreal_init (&real_zero, 0, 0);
sreal_init (&real_one, 1, 0);
sreal_init (&real_br_prob_base, REG_BR_PROB_BASE, 0);
sreal_init (&real_bb_freq_max, BB_FREQ_MAX, 0);
sreal_init (&real_one_half, 1, -1);
sreal_div (&real_inv_br_prob_base, &real_one, &real_br_prob_base);
sreal_sub (&real_almost_one, &real_one, &real_inv_br_prob_base);
}
mark_dfs_back_edges ();
/* Fill in the probability values in flowgraph based on the REG_BR_PROB