+/**
+ * Creates a new ir operation.
+ *
+ * @param code the opcode, one of type \c opcode
+ * @param name the printable name of this opcode
+ * @param p wheater operations of this opcode are op_pin_state_pinned or floating
+ * @param flags a bitmask of irop_flags describing the behavior of the ir operation
+ * @param opar the parity of this ir operation
+ * @param op_index if the parity is oparity_unary, oparity_binary or oparity_trinary the index
+ * of the left operand
+ * @param attr_size attribute size for this ir operation
+ *
+ * @return The genenerated ir operation.
+ */
+ir_op * new_ir_op(opcode code, const char *name, op_pin_state p,
+ unsigned flags, op_arity opar, int op_index, size_t attr_size);
+
+/**
+ * Frees a newly created ir operation.
+ */
+void free_ir_op(ir_op *code);
+
+/** Initialize the irop module. */
+void init_op(void);
+
+/** Free memory used by irop module. */
+void finish_op(void);
+
+/**
+ * Copies simply all attributes stored in the old node to the new node.
+ * Assumes both have the same opcode and sufficient size.
+ */
+void default_copy_attr(const ir_node *old_node, ir_node *new_node);
+
+/** Returns the attribute size of nodes of this opcode.
+ @note Use not encouraged, internal feature. */
+static INLINE int get_op_attr_size (const ir_op *op) {
+ return op->attr_size;
+}
+
+/** Returns non-zero if op is one of Start, End, Jmp, Cond, Return, Raise or Bad. */
+static INLINE int is_cfopcode(const ir_op *op) {
+ return op->flags & irop_flag_cfopcode;
+}
+
+/** Returns true if the operation manipulates interprocedural control flow:
+ CallBegin, EndReg, EndExcept */
+static INLINE int is_ip_cfopcode(const ir_op *op) {
+ return op->flags & irop_flag_ip_cfopcode;
+}
+
+/* Returns non-zero if operation is commutative */
+static INLINE int is_op_commutative(const ir_op *op) {
+ return op->flags & irop_flag_commutative;
+}
+
+/* Returns non-zero if operation is fragile */
+static INLINE int is_op_fragile(const ir_op *op) {
+ return op->flags & irop_flag_fragile;
+}
+
+/* Returns non-zero if operation is forking control flow */
+static INLINE int is_op_forking(const ir_op *op) {
+ return op->flags & irop_flag_forking;
+}
+
+static INLINE opcode __get_op_code(const ir_op *op) {
+ return op->code;
+}
+
+static INLINE ident *__get_op_ident(const ir_op *op){
+ return op->name;
+}
+
+static INLINE op_pin_state __get_op_pinned(const ir_op *op) {
+ return op->op_pin_state_pinned;
+}
+
+
+#define get_op_code(op) __get_op_code(op)
+#define get_op_ident(op) __get_op_ident(op)
+#define get_op_pinned(op) __get_op_pinned(op)