summaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2015-07-11 10:03:38 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2015-07-11 10:03:38 +0000
commitf1544089c12d6288f75074eedbd3b7653b48404c (patch)
treef8104aafda3dcc7f86f9693a27325a81ccd17590 /gcc/basic-block.h
parent15015c1adbcad827a109ca352b2d88953bd43f7a (diff)
re PR middle-end/66353 (Missing bb_has_abnormal_call_pred in basic-block.h)
PR middle-end/66353 * basic-block.h (has_abnormal_call_or_eh_pred_edge_p): New function. * ira-lives.c (bb_has_abnormal_call_pred): Remove function. (process_bb_node_lives): Call has_abnormal_call_or_eh_pred_edge_p rather than bb_has_abnormal_call_pred. * lra-lives.c (bb_has_abnormal_call_pred): Remove function. (process_bb_lives): Call has_abnormal_call_or_eh_pred_edge_p rather than bb_has_abnormal_call_pred. From-SVN: r225711
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 67555b2392c..389ed9fcee7 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -632,4 +632,21 @@ has_abnormal_or_eh_outgoing_edge_p (basic_block bb)
return false;
}
+
+/* Return true when one of the predecessor edges of BB is marked with
+ EDGE_ABNORMAL_CALL or EDGE_EH. */
+
+static inline bool
+has_abnormal_call_or_eh_pred_edge_p (basic_block bb)
+{
+ edge e;
+ edge_iterator ei;
+
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
+ return true;
+
+ return false;
+}
+
#endif /* GCC_BASIC_BLOCK_H */