memset(p, 0, node_size);
res = (ir_node *) (p + firm_add_node_size);
- res->kind = k_ir_node;
- res->op = op;
- res->mode = mode;
- res->visited = 0;
- res->link = NULL;
+ res->kind = k_ir_node;
+ res->op = op;
+ res->mode = mode;
+ res->visited = 0;
+ res->node_idx = get_irg_next_node_idx(irg);
+ res->link = NULL;
if (arity < 0) {
res->in = NEW_ARR_F (ir_node *, 1); /* 1: space for block */
} else {
return &node->attr;
}
+unsigned (get_irn_idx)(const ir_node *node) {
+ assert(is_ir_node(node));
+ return _get_irn_idx(node);
+}
+
/** manipulate fields of individual nodes **/
/* this works for all except Block */
return _is_irn_keep(node);
}
+/* Returns non-zero for nodes that are machine operations. */
+int (is_irn_machine_op)(const ir_node *node) {
+ return _is_irn_machine_op(node);
+}
+
+/* Returns non-zero for nodes that are machine operands. */
+int (is_irn_machine_operand)(const ir_node *node) {
+ return _is_irn_machine_operand(node);
+}
+
+/* Returns non-zero for nodes that have the n'th user machine flag set. */
+int (is_irn_machine_user)(const ir_node *node, unsigned n) {
+ return _is_irn_machine_user(node, n);
+}
+
+
/* Gets the string representation of the jump prediction .*/
const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred)
{