X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode_t.h;h=c32ad5427b17062fe739b4594e74cc4e4f186539;hb=3c3425a50a1d721b74a015c6812257e32feeac85;hp=2272b4f322252fb59a3e7e5f9d073d2e7fbd422b;hpb=8c9aa24a1f17891325986165a58434cf75f96f6d;p=libfirm diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index 2272b4f32..c32ad5427 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -46,28 +46,6 @@ ir_node **get_irn_in(const ir_node *node); */ extern unsigned firm_add_node_size; -/** - * Sets the get_type_attr operation for an ir_op_ops. - * - * @param code the opcode for the default operation - * @param ops the operations initialized - * - * @return - * The operations. - */ -void firm_set_default_get_type_attr(unsigned code, ir_op_ops *ops); - -/** - * Sets the get_entity_attr operation for an ir_op_ops. - * - * @param code the opcode for the default operation - * @param ops the operations initialized - * - * @return - * The operations. - */ -void firm_set_default_get_entity_attr(unsigned code, ir_op_ops *ops); - /** * Returns an array with the predecessors of the Block. Depending on * the implementation of the graph data structure this can be a copy of @@ -147,7 +125,7 @@ static inline ir_node *get_irn_n_(const ir_node *node, int n) assert(-1 <= n && n < get_irn_arity_(node)); nn = node->in[n + 1]; - if (nn->op != op_Id) return nn; + if (!is_Id(nn)) return nn; return (node->in[n + 1] = skip_Id(nn)); } @@ -175,18 +153,6 @@ static inline ir_node *get_irn_dep_(const ir_node *node, int pos) /* forward declaration outside iredges_t.h to avoid circular include problems */ void edges_notify_edge_kind(ir_node *src, int pos, ir_node *tgt, ir_node *old_tgt, ir_edge_kind_t kind, ir_graph *irg); -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 < (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)); -} - - static inline int get_irn_ins_or_deps_(const ir_node *irn) { return get_irn_deps_(irn) + get_irn_arity_(irn); @@ -422,7 +388,7 @@ static inline ir_graph *get_Block_irg_(const ir_node *block) static inline ir_tarval *get_Const_tarval_(const ir_node *node) { - assert(get_irn_op_(node) == op_Const); + assert(is_Const(node)); return node->attr.con.tarval; } @@ -478,13 +444,13 @@ static inline int is_irn_cse_neutral_(const ir_node *node) static inline cond_jmp_predicate get_Cond_jmp_pred_(const ir_node *node) { - assert(get_irn_op_(node) == op_Cond); + assert(is_Cond(node)); return node->attr.cond.jmp_pred; } static inline void set_Cond_jmp_pred_(ir_node *node, cond_jmp_predicate pred) { - assert(get_irn_op_(node) == op_Cond); + assert(is_Cond(node)); node->attr.cond.jmp_pred = pred; } @@ -597,6 +563,8 @@ static inline const ir_switch_table_entry *ir_switch_table_get_entry_const( return &table->entries[entry]; } +void ir_register_getter_ops(void); + /** initialize ir_node module */ void init_irnode(void); @@ -654,7 +622,6 @@ void init_irnode(void); #define get_irn_idx(node) get_irn_idx_(node) #define get_irn_deps(node) get_irn_deps_(node) -#define set_irn_dep(node, pos, dep) set_irn_dep_(node, pos, dep) #define get_irn_dep(node, pos) get_irn_dep_(node, pos) #define get_irn_ins_or_deps(node) get_irn_ins_or_deps_(node)