predict.c (tree_predict_edge): Do not predict entry edge and single succestor edge.

* predict.c (tree_predict_edge): Do not predict entry edge and
	single succestor edge.

From-SVN: r100581
This commit is contained in:
Jan Hubicka 2005-06-04 13:00:57 +02:00 committed by Jan Hubicka
parent 29405f9481
commit e0342c26d3
2 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2005-06-04 Jan Hubicka <jh@suse.cz>
* predict.c (tree_predict_edge): Do not predict entry edge and
single succestor edge.
2005-06-04 Joseph S. Myers <joseph@codesourcery.com>
PR c/21873

View file

@ -231,13 +231,17 @@ rtl_predict_edge (edge e, enum br_predictor predictor, int probability)
void
tree_predict_edge (edge e, enum br_predictor predictor, int probability)
{
struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction));
if ((e->src != ENTRY_BLOCK_PTR && EDGE_COUNT (e->src->succs) > 1)
&& flag_guess_branch_prob)
{
struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction));
i->next = e->src->predictions;
e->src->predictions = i;
i->probability = probability;
i->predictor = predictor;
i->edge = e;
i->next = e->src->predictions;
e->src->predictions = i;
i->probability = probability;
i->predictor = predictor;
i->edge = e;
}
}
/* Remove all predictions on given basic block that are attached