Commit e0342c26 by Jan Hubicka Committed by Jan Hubicka

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
parent 29405f94
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> 2005-06-04 Joseph S. Myers <joseph@codesourcery.com>
PR c/21873 PR c/21873
......
...@@ -231,13 +231,17 @@ rtl_predict_edge (edge e, enum br_predictor predictor, int probability) ...@@ -231,13 +231,17 @@ rtl_predict_edge (edge e, enum br_predictor predictor, int probability)
void void
tree_predict_edge (edge e, enum br_predictor predictor, int probability) 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; i->next = e->src->predictions;
e->src->predictions = i; e->src->predictions = i;
i->probability = probability; i->probability = probability;
i->predictor = predictor; i->predictor = predictor;
i->edge = e; i->edge = e;
}
} }
/* Remove all predictions on given basic block that are attached /* Remove all predictions on given basic block that are attached
......
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