return _get_irn_idx(node);
}
+int get_irn_pred_pos(ir_node *node, ir_node *arg) {
+ int i;
+ for (i = get_irn_arity(node) - 1; i >= 0; i--) {
+ if (get_irn_n(node, i) == arg)
+ return i;
+ }
+ return -1;
+}
+
/** manipulate fields of individual nodes **/
/* this works for all except Block */
const char *get_irn_opname (const ir_node *node);
/** Get the ident for a string representation of the opcode. */
ident *get_irn_opident (const ir_node *node);
+/** If arg is an argument of the node, returns it's position, -1 otherwise */
+int get_irn_pred_pos (ir_node *node, ir_node *arg);
/** Gets the visited counter of a node. */
unsigned long get_irn_visited (const ir_node *node);
/** Sets the visited counter of a node. */