X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode.c;h=f9957859d1491af88f50956342b7e1faeaff7b49;hb=4f92e524762e0febc361676111b3b5b79addd03a;hp=a8e9ed5935332533a3418b301e71a195e2835d52;hpb=af300963705d97b2f596e8cf2887813c25de6ad8;p=libfirm diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index a8e9ed593..f9957859d 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -516,19 +516,6 @@ ir_type *is_frame_pointer(const ir_node *n) return NULL; } -/* Test whether arbitrary node is tls pointer, i.e. Proj(pn_Start_P_tls) - * from Start. If so returns tls type, else Null. */ -ir_type *is_tls_pointer(const ir_node *n) -{ - if (is_Proj(n) && (get_Proj_proj(n) == pn_Start_P_tls)) { - ir_node *start = get_Proj_pred(n); - if (is_Start(start)) { - return get_tls_type(); - } - } - return NULL; -} - ir_node **get_Block_cfgpred_arr(ir_node *node) { assert(is_Block(node)); @@ -1045,19 +1032,19 @@ int Call_has_callees(const ir_node *node) (node->attr.call.callee_arr != NULL)); } -int get_Call_n_callees(const ir_node *node) +size_t get_Call_n_callees(const ir_node *node) { assert(is_Call(node) && node->attr.call.callee_arr); return ARR_LEN(node->attr.call.callee_arr); } -ir_entity *get_Call_callee(const ir_node *node, int pos) +ir_entity *get_Call_callee(const ir_node *node, size_t pos) { - assert(pos >= 0 && pos < get_Call_n_callees(node)); + assert(pos < get_Call_n_callees(node)); return node->attr.call.callee_arr[pos]; } -void set_Call_callee_arr(ir_node *node, const int n, ir_entity ** arr) +void set_Call_callee_arr(ir_node *node, size_t n, ir_entity ** arr) { ir_graph *irg = get_irn_irg(node); @@ -1261,55 +1248,6 @@ void set_memop_ptr(ir_node *node, ir_node *ptr) set_irn_n(node, 1, ptr); } -ir_volatility get_Load_volatility(const ir_node *node) -{ - assert(is_Load(node)); - return (ir_volatility)node->attr.load.volatility; -} - -void set_Load_volatility(ir_node *node, ir_volatility volatility) -{ - assert(is_Load(node)); - node->attr.load.volatility = volatility; -} - -ir_align get_Load_align(const ir_node *node) -{ - assert(is_Load(node)); - return (ir_align)node->attr.load.aligned; -} - -void set_Load_align(ir_node *node, ir_align align) -{ - assert(is_Load(node)); - node->attr.load.aligned = align; -} - - -ir_volatility get_Store_volatility(const ir_node *node) -{ - assert(is_Store(node)); - return (ir_volatility)node->attr.store.volatility; -} - -void set_Store_volatility(ir_node *node, ir_volatility volatility) -{ - assert(is_Store(node)); - node->attr.store.volatility = volatility; -} - -ir_align get_Store_align(const ir_node *node) -{ - assert(is_Store(node)); - return (ir_align)node->attr.store.aligned; -} - -void set_Store_align(ir_node *node, ir_align align) -{ - assert(is_Store(node)); - node->attr.store.aligned = align; -} - ir_node **get_Sync_preds_arr(ir_node *node) { @@ -1693,7 +1631,7 @@ static ir_type *get_Null_type(const ir_node *n) } /* Sets the get_type operation for an ir_op_ops. */ -ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops) +ir_op_ops *firm_set_default_get_type_attr(unsigned code, ir_op_ops *ops) { switch (code) { case iro_SymConst: ops->get_type_attr = get_SymConst_attr_type; break; @@ -1718,7 +1656,7 @@ static ir_entity *get_Null_ent(const ir_node *n) } /* Sets the get_type operation for an ir_op_ops. */ -ir_op_ops *firm_set_default_get_entity_attr(ir_opcode code, ir_op_ops *ops) +ir_op_ops *firm_set_default_get_entity_attr(unsigned code, ir_op_ops *ops) { switch (code) { case iro_SymConst: ops->get_entity_attr = get_SymConst_attr_entity; break;