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);
hook_normalize(n);
}
}
-} /* normalize_node */
+} /* ir_normalize_node */
/**
* Update the nodes after a match in the value table. If both nodes have
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));
/** 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);