+ir_node *new_{{node.constrname}}({{node|argdecls(True, True)}})
+{
+ return new_d_{{node.constrname}}(NULL{{node|args}});
+}
+''')
+
+# not used - as we have the pn_ declarations in libfirm/irnode.h where they
+# contain informative comments
+# {% for node in nodes %}
+# {% if node.outs %}
+# typedef enum {
+# {%- for out in node.outs %}
+# pn_{{node.name}}_{{out}},
+# {%- endfor %}
+# pn_{{node.name}}_max
+# } pn_{{node.name}};
+# {% endif %}
+# {% endfor %}
+
+irnode_h_template = env.from_string('''
+/* Warning: automatically generated code */
+
+{% for node in nodes|isnot('custom_is') %}
+static inline int _is_{{node.name}}(const ir_node *node)
+{
+ assert(node != NULL);
+ return _get_irn_op(node) == op_{{node.name}};
+}
+{% endfor %}
+
+{% for node in nodes %}
+#define is_{{node.name}}(node) _is_{{node.name}}(node)
+{%- endfor %}
+
+''')
+
+irnode_template = env.from_string('''
+/* Warning: automatically generated code */
+{% for node in nodes %}
+int (is_{{node.name}})(const ir_node *node)
+{
+ return _is_{{node.name}}(node);
+}
+{% endfor %}
+''')
+
+irop_template = env.from_string('''
+/* Warning: automatically generated code */
+{% for node in nodes %}
+ir_op *op_{{node.name}}; ir_op *get_op_{{node.name}}(void) { return op_{{node.name}}; }
+{%- endfor %}
+
+void init_op(void)
+{
+ {% for node in nodes %}
+ op_{{node.name}} = new_ir_op(iro_{{node.name}}, "{{node.name}}", {{node|pinned}}, {{node|flags}}, {{node|arity}}, {{node|opindex}}, {{node|attr_size}}, NULL);
+ {%- endfor %}
+
+ be_init_op();
+}
+
+void finish_op(void)