+/* Return the type attribute of a node n (SymConst, Call, Alloc, Free,
+ Cast) or NULL.*/
+ir_type *(get_irn_type_attr)(ir_node *node) {
+ return _get_irn_type_attr(node);
+}
+
+/* Return the entity attribute of a node n (SymConst, Sel) or NULL. */
+entity *(get_irn_entity_attr)(ir_node *node) {
+ return _get_irn_entity_attr(node);
+}
+
+/* Returns non-zero for constant-like nodes. */
+int (is_irn_constlike)(const ir_node *node) {
+ return _is_irn_constlike(node);
+}
+
+/*
+ * Returns non-zero for nodes that are allowed to have keep-alives and
+ * are neither Block nor PhiM.
+ */
+int (is_irn_keep)(const ir_node *node) {
+ 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)
+{
+ switch (pred) {
+ default:
+ case COND_JMP_PRED_NONE: return "no prediction";
+ case COND_JMP_PRED_TRUE: return "true taken";
+ case COND_JMP_PRED_FALSE: return "false taken";
+ }
+}
+
+/* Returns the conditional jump prediction of a Cond node. */
+cond_jmp_predicate (get_Cond_jmp_pred)(ir_node *cond) {
+ return _get_Cond_jmp_pred(cond);
+}
+
+/* Sets a new conditional jump prediction. */
+void (set_Cond_jmp_pred)(ir_node *cond, cond_jmp_predicate pred) {
+ _set_Cond_jmp_pred(cond, pred);
+}
+
+/** the get_type operation must be always implemented and return a firm type */
+static ir_type *get_Default_type(ir_node *n) {
+ return get_unknown_type();
+}
+
+/* Sets the get_type operation for an ir_op_ops. */
+ir_op_ops *firm_set_default_get_type(opcode code, ir_op_ops *ops)
+{
+ switch (code) {
+ case iro_Const: ops->get_type = get_Const_type; break;
+ case iro_SymConst: ops->get_type = get_SymConst_value_type; break;
+ case iro_Cast: ops->get_type = get_Cast_type; break;
+ case iro_Proj: ops->get_type = get_Proj_type; break;
+ default:
+ /* not allowed to be NULL */
+ if (! ops->get_type)
+ ops->get_type = get_Default_type;
+ break;
+ }
+ return ops;
+}
+
+/** Return the attribute type of a SymConst node if exists */
+static ir_type *get_SymConst_attr_type(ir_node *self) {
+ symconst_kind kind = get_SymConst_kind(self);
+ if (SYMCONST_HAS_TYPE(kind))
+ return get_SymConst_type(self);
+ return NULL;
+}
+
+/** Return the attribute entity of a SymConst node if exists */
+static entity *get_SymConst_attr_entity(ir_node *self) {
+ symconst_kind kind = get_SymConst_kind(self);
+ if (SYMCONST_HAS_ENT(kind))
+ return get_SymConst_entity(self);
+ return NULL;
+}
+
+/** the get_type_attr operation must be always implemented */
+static ir_type *get_Null_type(ir_node *n) {
+ return firm_unknown_type;
+}
+
+/* Sets the get_type operation for an ir_op_ops. */
+ir_op_ops *firm_set_default_get_type_attr(opcode code, ir_op_ops *ops)
+{
+ switch (code) {
+ case iro_SymConst: ops->get_type_attr = get_SymConst_attr_type; break;
+ case iro_Call: ops->get_type_attr = get_Call_type; break;
+ case iro_Alloc: ops->get_type_attr = get_Alloc_type; break;
+ case iro_Free: ops->get_type_attr = get_Free_type; break;
+ case iro_Cast: ops->get_type_attr = get_Cast_type; break;
+ default:
+ /* not allowed to be NULL */
+ if (! ops->get_type_attr)
+ ops->get_type_attr = get_Null_type;
+ break;
+ }
+ return ops;
+}
+
+/** the get_entity_attr operation must be always implemented */
+static entity *get_Null_ent(ir_node *n) {