X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode_t.h;h=b824f613a1c7d726ff1afd52f19cd7c4045827cf;hb=79b409329e8b6e9f43ac71df6599372fa0dbe497;hp=d65b3aaa2a42b230156c2d61a2e544e59c4bc2e9;hpb=c433f42a558477b4a4b5043ce88c824dd4eec2cc;p=libfirm diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index d65b3aaa2..b824f613a 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -58,6 +58,7 @@ load_attr *get_irn_load_attr (ir_node *node); store_attr *get_irn_store_attr (ir_node *node); except_attr *get_irn_except_attr (ir_node *node); divmod_attr *get_irn_divmod_attr (ir_node *node); +builtin_attr *get_irn_builtin_attr (ir_node *node); /** @} */ /** @@ -98,6 +99,14 @@ ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops); */ ir_op_ops *firm_set_default_get_entity_attr(ir_opcode 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 + * the internal representation of predecessors as well as the internal + * array itself. Therefore writing to this array might obstruct the IR. + */ +ir_node **get_Block_cfgpred_arr(ir_node *node); + /*-------------------------------------------------------------------*/ /* These function are most used in libfirm. Give them as static */ /* functions so they can be inlined. */ @@ -496,6 +505,12 @@ _is_Carry(const ir_node *node) { return (_get_irn_op(node) == op_Carry); } +static inline int +_is_Borrow(const ir_node *node) { + assert(node); + return (_get_irn_op(node) == op_Borrow); +} + static inline int _is_And(const ir_node *node) { assert(node); @@ -752,6 +767,12 @@ _is_ASM(const ir_node *node) { return (_get_irn_op(node) == op_ASM); } +static inline int +_is_Dummy(const ir_node *node) { + assert(node); + return (_get_irn_op(node) == op_Dummy); +} + static inline int _is_Anchor(const ir_node *node) { return (_get_irn_op(node) == op_Anchor); @@ -791,7 +812,7 @@ _get_Block_cfgpred(const ir_node *node, int pos) { * We walk from the predecessor to the next pinned node * (skip_Proj) and return the block that node is in. * - If we encounter the Bad node, this function does not return - * Start, but the Bad node. + * the Start block, but the Bad node. */ static inline ir_node * _get_Block_cfgpred_block(const ir_node *node, int pos) { @@ -909,12 +930,12 @@ static inline int _is_irn_machine_user(const ir_node *node, unsigned n) { static inline cond_jmp_predicate _get_Cond_jmp_pred(const ir_node *node) { assert(_get_irn_op(node) == op_Cond); - return node->attr.cond.pred; + 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); - node->attr.cond.pred = pred; + node->attr.cond.jmp_pred = pred; } static inline void *_get_irn_generic_attr(ir_node *node) { @@ -1064,6 +1085,7 @@ _is_arg_Proj(const ir_node *node) { #define is_IJmp(node) _is_IJmp(node) #define is_Raise(node) _is_Raise(node) #define is_ASM(node) _is_ASM(node) +#define is_Dummy(node) _is_Dummy(node) #define is_Anchor(node) _is_Anchor(node) #define is_Bad(node) _is_Bad(node) #define is_NoMem(node) _is_NoMem(node) @@ -1077,6 +1099,7 @@ _is_arg_Proj(const ir_node *node) { #define is_Quot(node) _is_Quot(node) #define is_Add(node) _is_Add(node) #define is_Carry(node) _is_Carry(node) +#define is_Borrow(node) _is_Borrow(node) #define is_And(node) _is_And(node) #define is_Or(node) _is_Or(node) #define is_Eor(node) _is_Eor(node)