Commit c4f6b78e by Richard Earnshaw Committed by Richard Earnshaw

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
parent 2bcbe1b7
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> 2003-02-28 Richard Henderson <rth@redhat.com>
* toplev.c (flag_eliminate_unused_debug_types): Enable by default. * toplev.c (flag_eliminate_unused_debug_types): Enable by default.
......
...@@ -1173,13 +1173,18 @@ estimate_bb_frequencies (loops) ...@@ -1173,13 +1173,18 @@ estimate_bb_frequencies (loops)
counts_to_freqs (); counts_to_freqs ();
else else
{ {
sreal_init (&real_zero, 0, 0); static int real_values_initialized = 0;
sreal_init (&real_one, 1, 0);
sreal_init (&real_br_prob_base, REG_BR_PROB_BASE, 0); if (!real_values_initialized)
sreal_init (&real_bb_freq_max, BB_FREQ_MAX, 0); {
sreal_init (&real_one_half, 1, -1); sreal_init (&real_zero, 0, 0);
sreal_div (&real_inv_br_prob_base, &real_one, &real_br_prob_base); sreal_init (&real_one, 1, 0);
sreal_sub (&real_almost_one, &real_one, &real_inv_br_prob_base); 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 (); mark_dfs_back_edges ();
/* Fill in the probability values in flowgraph based on the REG_BR_PROB /* Fill in the probability values in flowgraph based on the REG_BR_PROB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment