From 16c77795a1bfdad4cbf28de90756af2a45f29d3b Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 27 Oct 2004 08:47:45 +0000 Subject: [PATCH] Added operation for reassociation [r4218] --- ir/ir/irop_t.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ir/ir/irop_t.h b/ir/ir/irop_t.h index b5e5c702a..92f040227 100644 --- a/ir/ir/irop_t.h +++ b/ir/ir/irop_t.h @@ -79,6 +79,13 @@ typedef ir_node *(*transform_node_func)(ir_node *n); */ typedef int (*node_cmp_attr_func)(ir_node *a, ir_node *b); +/** + * The reassociation operation. + * Called from a walker. Returns non-zero if + * a reassociation rule was applied. + */ +typedef int (*reassociate_func)(ir_node *n); + /** The type of an ir_op. */ struct ir_op { opcode code; /**< the unique opcode of the op */ @@ -94,6 +101,7 @@ struct ir_op { equivalent_node_func equivalent_node; /**< optimizes the node by returning an equivalent one. */ transform_node_func transform_node; /**< optimizes the node by transforming it. */ node_cmp_attr_func node_cmp_attr; /**< compares two node attributes. */ + reassociate_func reassociate; /**< reassociate a tree */ }; /** -- 2.20.1