- changed handling of Mux nodes: these are now optimized using the iropt instead...
[libfirm] / ir / ir / irnode.c
index b25e89a..bf07359 100644 (file)
@@ -525,7 +525,7 @@ symconst_attr *get_irn_symconst_attr(ir_node *node) {
 
 ir_type *get_irn_call_attr(ir_node *node) {
        assert(is_Call(node));
-       return node->attr.call.cld_tp = skip_tid(node->attr.call.cld_tp);
+       return node->attr.call.type = skip_tid(node->attr.call.type);
 }
 
 sel_attr *get_irn_sel_attr(ir_node *node) {
@@ -1369,14 +1369,14 @@ set_Call_param(ir_node *node, int pos, ir_node *param) {
 ir_type *
 get_Call_type(ir_node *node) {
        assert(is_Call(node));
-       return node->attr.call.cld_tp = skip_tid(node->attr.call.cld_tp);
+       return node->attr.call.type = skip_tid(node->attr.call.type);
 }
 
 void
 set_Call_type(ir_node *node, ir_type *tp) {
        assert(is_Call(node));
        assert((get_unknown_type() == tp) || is_Method_type(tp));
-       node->attr.call.cld_tp = tp;
+       node->attr.call.type = tp;
 }
 
 ir_node *
@@ -1430,14 +1430,14 @@ set_Builtin_param(ir_node *node, int pos, ir_node *param) {
 ir_type *
 get_Builtin_type(ir_node *node) {
        assert(is_Builtin(node));
-       return node->attr.builtin.builtin_tp = skip_tid(node->attr.builtin.builtin_tp);
+       return node->attr.builtin.type = skip_tid(node->attr.builtin.type);
 }
 
 void
 set_Builtin_type(ir_node *node, ir_type *tp) {
        assert(is_Builtin(node));
        assert((get_unknown_type() == tp) || is_Method_type(tp));
-       node->attr.builtin.builtin_tp = tp;
+       node->attr.builtin.type = tp;
 }
 
 /* Returns a human readable string for the ir_builtin_kind. */
@@ -1447,7 +1447,7 @@ const char *get_builtin_kind_name(ir_builtin_kind kind) {
                X(ir_bk_trap);
                X(ir_bk_debugbreak);
                X(ir_bk_return_address);
-               X(ir_bk_frame_addess);
+               X(ir_bk_frame_address);
                X(ir_bk_prefetch);
                X(ir_bk_ffs);
                X(ir_bk_clz);
@@ -1587,6 +1587,7 @@ void set_##OP##_resmode(ir_node *node, ir_mode *mode) { \
 
 
 BINOP(Add)
+BINOP(Borrow)
 BINOP(Carry)
 BINOP(Sub)
 UNOP(Minus)
@@ -1614,6 +1615,11 @@ int get_Div_no_remainder(const ir_node *node) {
        return node->attr.divmod.no_remainder;
 }
 
+void set_Div_no_remainder(ir_node *node, int no_remainder) {
+       assert(is_Div(node));
+       node->attr.divmod.no_remainder = no_remainder;
+}
+
 int get_Conv_strict(const ir_node *node) {
        assert(is_Conv(node));
        return node->attr.conv.strict;
@@ -2352,12 +2358,12 @@ void set_CopyB_src(ir_node *node, ir_node *src) {
 
 ir_type *get_CopyB_type(ir_node *node) {
        assert(is_CopyB(node));
-       return node->attr.copyb.data_type = skip_tid(node->attr.copyb.data_type);
+       return node->attr.copyb.type = skip_tid(node->attr.copyb.type);
 }
 
 void set_CopyB_type(ir_node *node, ir_type *data_type) {
        assert(is_CopyB(node) && data_type);
-       node->attr.copyb.data_type = data_type;
+       node->attr.copyb.type = data_type;
 }
 
 
@@ -3220,30 +3226,6 @@ dbg_info *(get_irn_dbg_info)(const ir_node *n) {
        return _get_irn_dbg_info(n);
 }
 
-#if 0 /* allow the global pointer */
-
-/* checks whether a node represents a global address */
-int is_Global(const ir_node *node) {
-       ir_node *ptr;
-
-       if (is_SymConst_addr_ent(node))
-               return 1;
-       if (! is_Sel(node))
-               return 0;
-
-       ptr = get_Sel_ptr(node);
-       return is_globals_pointer(ptr) != NULL;
-}
-
-/* returns the entity of a global address */
-ir_entity *get_Global_entity(const ir_node *node) {
-       if (is_SymConst(node))
-               return get_SymConst_entity(node);
-       else
-               return get_Sel_entity(node);
-}
-#else
-
 /* checks whether a node represents a global address */
 int is_Global(const ir_node *node) {
        return is_SymConst_addr_ent(node);
@@ -3253,7 +3235,6 @@ int is_Global(const ir_node *node) {
 ir_entity *get_Global_entity(const ir_node *node) {
        return get_SymConst_entity(node);
 }
-#endif
 
 /*
  * Calculate a hash value of a node.