- renamed normalize_node() into ir_normalize_node() and make it available outside...
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 28 Oct 2008 04:33:06 +0000 (04:33 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 28 Oct 2008 04:33:06 +0000 (04:33 +0000)
[r23249]

ir/ir/iropt.c
ir/ir/iropt_t.h

index 43390e8..b4f5f0f 100644 (file)
@@ -6036,13 +6036,9 @@ void del_identities(pset *value_table) {
        del_pset(value_table);
 }  /* del_identities */
 
-/**
- * Normalize a node by putting constants (and operands with larger
- * node index) on the right (operator side).
- *
- * @param n   The node to normalize
- */
-static void normalize_node(ir_node *n) {
+/* Normalize a node by putting constants (and operands with larger
+ * node index) on the right (operator side). */
+void ir_normalize_node(ir_node *n) {
        if (is_op_commutative(get_irn_op(n))) {
                ir_node *l = get_binop_left(n);
                ir_node *r = get_binop_right(n);
@@ -6057,7 +6053,7 @@ static void normalize_node(ir_node *n) {
                        hook_normalize(n);
                }
        }
-}  /* normalize_node */
+}  /* ir_normalize_node */
 
 /**
  * Update the nodes after a match in the value table. If both nodes have
@@ -6123,7 +6119,7 @@ ir_node *identify_remember(pset *value_table, ir_node *n) {
 
        if (!value_table) return n;
 
-       normalize_node(n);
+       ir_normalize_node(n);
        /* lookup or insert in hash table with given hash key. */
        o = pset_insert(value_table, n, ir_node_hash(n));
 
index 745bde8..0345b73 100644 (file)
@@ -83,6 +83,14 @@ ir_node *identify_remember(pset *value_table, ir_node *n);
 /** Visit each node in the value table of a graph. */
 void visit_all_identities(ir_graph *irg, irg_walk_func visit, void *env);
 
+/**
+ * Normalize a node by putting constants (and operands with larger
+ * node index) on the right (operator side).
+ *
+ * @param n   The node to normalize
+ */
+void ir_normalize_node(ir_node *n);
+
 ir_node *optimize_node(ir_node *n);
 
 ir_node *optimize_in_place_2(ir_node *n);