return &node->attr.divmod;
}
+builtin_attr *get_irn_builtin_attr(ir_node *node) {
+ assert(is_Builtin(node));
+ return &node->attr.builtin;
+}
+
void *(get_irn_generic_attr)(ir_node *node) {
assert(is_ir_node(node));
return _get_irn_generic_attr(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);
/** @} */
/**
/** Compares the attributes of two Confirm nodes. */
static int node_cmp_attr_Confirm(ir_node *a, ir_node *b) {
+ /* no need to compare the bound, as this is a input */
return (get_Confirm_cmp(a) != get_Confirm_cmp(b));
} /* node_cmp_attr_Confirm */
+/** Compares the attributes of two Builtin nodes. */
+static int node_cmp_attr_Builtin(ir_node *a, ir_node *b) {
+ const builtin_attr *ma = get_irn_builtin_attr(a);
+ const builtin_attr *mb = get_irn_builtin_attr(b);
+
+ /* no need to compare the type, equal kind means equal type */
+ return ma->kind != mb->kind;
+} /* node_cmp_attr_Builtin */
+
/** Compares the attributes of two ASM nodes. */
static int node_cmp_attr_ASM(ir_node *a, ir_node *b) {
int i, n;
CASE(Mod);
CASE(Quot);
CASE(Bound);
+ CASE(Builtin);
/* FIXME CopyB */
default:
/* leave NULL */;
long proj; /**< For Proj nodes, its proj number */
ir_entity *ent; /**< For Sel Nodes, its entity */
int intVal; /**< For Conv/Div Nodes: strict/remainderless */
+ unsigned uintVal;/**< for Builtin: the kind */
ir_node *block; /**< for Block: itself */
void *ptr; /**< generic pointer for hash/cmp */
} u;
case iro_Load:
key.mode = get_Load_mode(irn);
break;
+ case iro_Builtin:
+ key.u.uintVal = get_Builtin_kind(irn);
+ break;
default:
break;
}
case iro_Load:
assert(key.mode == get_Load_mode(irn));
break;
+ case iro_Builtin:
+ assert(key.u.uintVal == get_Builtin_kind(irn));
+ break;
default:
break;
}
return o1->code != o2->code || o1->mode != o2->mode ||
o1->arity != o2->arity ||
o1->u.proj != o2->u.proj ||
- o1->u.intVal != o2->u.intVal ||
+ o1->u.intVal != o2->u.intVal || /* this already checks uIntVal */
o1->u.ptr != o2->u.ptr;
} /* cmp_opcode */
case iro_Load:
key.mode = get_Load_mode(irn);
break;
+ case iro_Builtin:
+ key.u.uintVal = get_Builtin_kind(irn);
+ break;
default:
break;
}