From 5c8fea174ada95511143ff2838ae1c2ce04bae6f Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 3 Feb 2006 16:59:11 +0000 Subject: [PATCH] make identities_cmp() and identify_remember() accessible [r7318] --- ir/ir/iropt_t.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ir/ir/iropt_t.h b/ir/ir/iropt_t.h index 35b6fde76..29d3b3b38 100644 --- a/ir/ir/iropt_t.h +++ b/ir/ir/iropt_t.h @@ -23,6 +23,7 @@ # include "pset.h" # include "iropt.h" +# include "tv.h" ir_node *equivalent_node (ir_node *n); @@ -38,9 +39,22 @@ ir_node *optimize_node (ir_node *n); ir_node *optimize_in_place_2 (ir_node *n); -/* Calculate a hash value of a node. */ +/** Calculate a hash value of a node. */ unsigned ir_node_hash (ir_node *node); +/** + * Compare function for two nodes in the hash table. Gets two + * nodes as parameters. Returns 0 if the nodes are a cse. + */ +int identities_cmp(const void *elt, const void *key); + +/** + * Return the canonical node computing the same value as n. + * Looks up the node in a hash table, enters it in the table + * if it isn't there yet. + */ +ir_node *identify_remember(pset *value_table, ir_node *n); + /** * Returns the tarval of a Const node or tarval_bad for all other nodes. */ -- 2.20.1