From: Michael Beck Date: Tue, 28 Oct 2008 04:33:06 +0000 (+0000) Subject: - renamed normalize_node() into ir_normalize_node() and make it available outside... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=00ac040bae07059a0dc7ed804c424702a1fcaa36;p=libfirm - renamed normalize_node() into ir_normalize_node() and make it available outside iropt.c [r23249] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 43390e837..b4f5f0fb6 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -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)); diff --git a/ir/ir/iropt_t.h b/ir/ir/iropt_t.h index 745bde8e2..0345b738d 100644 --- a/ir/ir/iropt_t.h +++ b/ir/ir/iropt_t.h @@ -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);