let backends specify the complete long double type
[libfirm] / ir / ir / irnode.c
index 7a6fb31..9086fcf 100644 (file)
@@ -1071,23 +1071,6 @@ void remove_Call_callee_arr(ir_node *node)
        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.
@@ -1328,6 +1311,20 @@ int is_x_regular_Proj(const ir_node *node)
        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));
@@ -1524,6 +1521,9 @@ int (is_SymConst_addr_ent)(const ir_node *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));
 }