+2017-06-08 Jan Hubicka <hubicka@ucw.cz>
+
+ * predict.c (unlikely_executed_edge_p): Move ahead.
+ (probably_never_executed_edge_p): Use it.
+
2017-06-08 Alexander Ivchenko <alexander.ivchenko@intel.com>
PR middle-end/79988
}
+/* Return true if E is unlikely executed for obvious reasons. */
+
+static bool
+unlikely_executed_edge_p (edge e)
+{
+ return e->count == profile_count::zero ()
+ || (e->flags & (EDGE_EH | EDGE_FAKE));
+}
+
/* Return true in case edge E is probably never executed. */
bool
probably_never_executed_edge_p (struct function *fun, edge e)
{
+ if (e->count.initialized_p ())
+ unlikely_executed_edge_p (e);
return probably_never_executed (fun, e->count, EDGE_FREQUENCY (e));
}
fprintf (file, "\n");
}
-/* Return true if E is unlikely executed. */
-
-static bool
-unlikely_executed_edge_p (edge e)
-{
- return e->count == profile_count::zero ()
- || (e->flags & (EDGE_EH | EDGE_FAKE));
-}
-
/* Return true if STMT is known to be unlikely executed. */
static bool