From f89f5588908aa1adfbd56667878a188c09f666ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Tue, 6 Jul 2004 13:32:25 +0000 Subject: [PATCH] better hasah for symconst [r3317] --- ir/ir/iropt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index c0733b14b..ca9a531f7 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -1493,9 +1493,12 @@ ir_node_hash (ir_node *node) if (node->op == op_Const) { /* special value for const, as they only differ in their tarval. */ - /* @@@ What about SymConst? */ h = ((unsigned) node->attr.con.tv)>>3 ; h = 9*h + (unsigned)get_irn_mode(node); + } else if (node->op == op_SymConst) { + /* special value for const, as they only differ in their symbol. */ + h = ((unsigned) node->attr.i.sym.type_p)>>3 ; + h = 9*h + (unsigned)get_irn_mode(node); } else { /* hash table value = 9*(9*(9*(9*(9*arity+in[0])+in[1])+ ...)+mode)+code */ -- 2.20.1