irop: add more generic function callbacks
authorMatthias Braun <matthias.braun@kit.edu>
Mon, 27 Aug 2012 11:41:15 +0000 (13:41 +0200)
committerMatthias Braun <matthias.braun@kit.edu>
Mon, 27 Aug 2012 11:41:49 +0000 (13:41 +0200)
include/libfirm/irop.h
ir/ir/irop.c

index 21d413a..42d1d5a 100644 (file)
@@ -256,6 +256,8 @@ typedef struct {
        verify_proj_node_func verify_proj_node;     /**< Verify the Proj node. */
        dump_node_func        dump_node;            /**< Dump a node. */
        op_func               generic;              /**< A generic function pointer. */
+       op_func               generic1;             /**< A generic function pointer. */
+       op_func               generic2;             /**< A generic function pointer. */
        const arch_irn_ops_t *be_ops;               /**< callbacks used by the backend. */
 } ir_op_ops;
 
index ba3e476..67eab22 100644 (file)
@@ -112,8 +112,11 @@ void ir_clear_opcodes_generic_func(void)
 
        for (i = 0; i < n; ++i) {
                ir_op *op = ir_get_opcode(i);
-               if (op != NULL)
-                       op->ops.generic = (op_func)NULL;
+               if (op == NULL)
+                       continue;
+               op->ops.generic  = (op_func)NULL;
+               op->ops.generic1 = (op_func)NULL;
+               op->ops.generic2 = (op_func)NULL;
        }
 }