X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode_t.h;h=aa70bbd371ae74155695fa3c559dab00b5c965f7;hb=4f92e524762e0febc361676111b3b5b79addd03a;hp=08c884e2fc10e5563b5ef01cccc99c3515e8274e;hpb=f8d7cadcac7404b56a67f0c6b6cd71a76cda9bd6;p=libfirm diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index 08c884e2f..aa70bbd37 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -56,7 +56,7 @@ extern unsigned firm_add_node_size; * @return * The operations. */ -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); /** * Sets the get_entity_attr operation for an ir_op_ops. @@ -67,7 +67,7 @@ ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops); * @return * The operations. */ -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); /** * Returns an array with the predecessors of the Block. Depending on @@ -135,7 +135,7 @@ static inline unsigned _get_irn_opcode(const ir_node *node) */ static inline int _get_irn_arity(const ir_node *node) { - return ARR_LEN(node->in) - 1; + return (int)(ARR_LEN(node->in) - 1); } /** @@ -167,12 +167,12 @@ static inline unsigned hash_irn(const ir_node *node) } static inline int _get_irn_deps(const ir_node *node) { - return node->deps ? ARR_LEN(node->deps) : 0; + return node->deps ? (int)ARR_LEN(node->deps) : 0; } static inline ir_node *_get_irn_dep(const ir_node *node, int pos) { assert(node->deps && "dependency array node yet allocated. use add_irn_dep()"); - assert(pos >= 0 && pos < ARR_LEN(node->deps) && "dependency index out of range"); + assert(pos >= 0 && pos < (int)ARR_LEN(node->deps) && "dependency index out of range"); return node->deps[pos]; } @@ -184,7 +184,7 @@ static inline void _set_irn_dep(ir_node *node, int pos, ir_node *dep) ir_node *old; assert(node->deps && "dependency array node yet allocated. use add_irn_dep()"); - assert(pos >= 0 && pos < ARR_LEN(node->deps) && "dependency index out of range"); + assert(pos >= 0 && pos < (int)ARR_LEN(node->deps) && "dependency index out of range"); old = node->deps[pos]; node->deps[pos] = dep; edges_notify_edge_kind(node, pos, dep, old, EDGE_KIND_DEP, get_irn_irg(node)); @@ -432,9 +432,12 @@ static inline int _is_Block_dead(const ir_node *block) { ir_op *op = _get_irn_op(block); - if (op == op_Bad) + /* we can have Bad, Anchor and Block nodes as block input */ + if (op == op_Bad) { return 1; - else { + } else if (op == op_Anchor) { + return 0; + } else { assert(op == op_Block); return block->attr.block.is_dead; } @@ -446,7 +449,7 @@ static inline ir_graph *_get_Block_irg(const ir_node *block) return block->attr.irg.irg; } -static inline tarval *_get_Const_tarval(const ir_node *node) { +static inline ir_tarval *_get_Const_tarval(const ir_node *node) { assert(_get_irn_op(node) == op_Const); return node->attr.con.tarval; }