node->attr.call.callee_arr = NULL;
}
-/*
- * Returns non-zero if a Call is surely a self-recursive Call.
- * Beware: if this functions returns 0, the call might be self-recursive!
- */
-int is_self_recursive_Call(const ir_node *call)
-{
- const ir_node *callee = get_Call_ptr(call);
-
- if (is_SymConst_addr_ent(callee)) {
- const ir_entity *ent = get_SymConst_entity(callee);
- const ir_graph *irg = get_entity_irg(ent);
- if (irg == get_irn_irg(call))
- return 1;
- }
- return 0;
-}
-
/* Checks for upcast.
*
* Returns true if the Cast node casts a class type to a super type.
return get_Proj_proj(node) == pred->op->pn_x_regular;
}
+void ir_set_throws_exception(ir_node *node, int throws_exception)
+{
+ except_attr *attr = &node->attr.except;
+ assert(is_fragile_op(node));
+ attr->throws_exception = throws_exception;
+}
+
+int ir_throws_exception(const ir_node *node)
+{
+ const except_attr *attr = &node->attr.except;
+ assert(is_fragile_op(node));
+ return attr->throws_exception;
+}
+
ir_node **get_Tuple_preds_arr(ir_node *node)
{
assert(is_Tuple(node));
/* Returns true if the operation manipulates control flow. */
int is_cfop(const ir_node *node)
{
+ if (is_fragile_op(node) && ir_throws_exception(node))
+ return true;
+
return is_op_cfopcode(get_irn_op(node));
}