}
}
-/* Filter edge predictions PREDS by a function FILTER. DATA are passed
- to the filter function. */
+/* Filter edge predictions PREDS by a function FILTER: if FILTER return false
+ the prediction is removed.
+ DATA are passed to the filter function. */
-void
+static void
filter_predictions (edge_prediction **preds,
bool (*filter) (edge_prediction *, void *), void *data)
{
/* Filter function predicate that returns true for a edge predicate P
if its edge is equal to DATA. */
-bool
-equal_edge_p (edge_prediction *p, void *data)
+static bool
+not_equal_edge_p (edge_prediction *p, void *data)
{
- return p->ep_edge == (edge)data;
+ return p->ep_edge != (edge)data;
}
/* Remove all predictions on given basic block that are attached
return;
edge_prediction **preds = bb_predictions->get (e->src);
- filter_predictions (preds, equal_edge_p, e);
+ filter_predictions (preds, not_equal_edge_p, e);
}
/* Clears the list of predictions stored for BB. */