summaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 654e63a9478..bddba84b7e1 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -511,6 +511,12 @@ struct edge_list
#define BRANCH_EDGE(bb) ((bb)->succ->flags & EDGE_FALLTHRU \
? (bb)->succ->succ_next : (bb)->succ)
+/* Return expected execution frequency of the edge E. */
+#define EDGE_FREQUENCY(e) (((e)->src->frequency \
+ * (e)->probability \
+ + REG_BR_PROB_BASE / 2) \
+ / REG_BR_PROB_BASE)
+
struct edge_list * create_edge_list PARAMS ((void));
void free_edge_list PARAMS ((struct edge_list *));
void print_edge_list PARAMS ((FILE *, struct edge_list *));