* cfg.c (update_bb_profile_for_threading): Fix profile updating.
(scale_bbs_frequencies_int): Watch roundoff errors.
* predict.c (return_prediction): Initialize return_stmt.
From-SVN: r102087
+2005-07-16 Jan Hubicka <jh@suse.cz>
+
+ * cfg.c (update_bb_profile_for_threading): Fix profile updating.
+ (scale_bbs_frequencies_int): Watch roundoff errors.
+ * predict.c (return_prediction): Initialize return_stmt.
+
2005-07-16 Jan Hubicka <jh@suse.cz>
* profile.c (rest_of_handle_branch_prob): Fix handling of estimation
int scale = 65536 * REG_BR_PROB_BASE / prob;
FOR_EACH_EDGE (c, ei, bb->succs)
- c->probability = (c->probability * scale) / 65536;
+ {
+ c->probability = (c->probability * scale) / 65536;
+ if (c->probability > REG_BR_PROB_BASE)
+ c->probability = REG_BR_PROB_BASE;
+ }
}
gcc_assert (bb == taken_edge->src);
{
int i;
edge e;
+ if (num < 0)
+ num = 0;
+ if (num > den)
+ return;
for (i = 0; i < nbbs; i++)
{
edge_iterator ei;
static void
apply_return_prediction (int *heads)
{
- tree return_stmt;
+ tree return_stmt = NULL;
tree return_val;
edge e;
tree phi;