* cfg.c (remove_edge): Use it.
* predict.c (remove_predictions_associated_with_edge): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100551
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-06-03 Jan Hubicka <jh@suse.cz>
+
+ * basic-block.h (remove_predictions_associated_with_edge): Declare.
+ * cfg.c (remove_edge): Use it.
+ * predict.c (remove_predictions_associated_with_edge): New function.
+
2005-06-03 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
extern void rtl_predict_edge (edge, enum br_predictor, int);
extern void predict_edge_def (edge, enum br_predictor, enum prediction);
extern void guess_outgoing_edge_probabilities (basic_block);
+extern void remove_predictions_associated_with_edge (edge);
/* In flow.c */
extern void init_flow (void);
void
remove_edge (edge e)
{
+ remove_predictions_associated_with_edge (e);
execute_on_shrinking_pred (e);
disconnect_src (e);
i->edge = e;
}
+/* Remove all predictions on given basic block that are attached
+ to edge E. */
+void
+remove_predictions_associated_with_edge (edge e)
+{
+ if (e->src->predictions)
+ {
+ struct edge_prediction **prediction = &e->src->predictions;
+ while (*prediction)
+ {
+ if ((*prediction)->edge == e)
+ *prediction = (*prediction)->next;
+ else
+ prediction = &((*prediction)->next);
+ }
+ }
+}
+
/* Return true when we can store prediction on insn INSN.
At the moment we represent predictions only on conditional
jumps, not at computed jump or other complicated cases. */