From e5ea9ef5689fd3179b5cc16e400a7517b0c919b5 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sat, 18 Apr 2009 19:07:57 +0000 Subject: [PATCH] - improved hash_Const(): no need to hash the mode, this is already contained in the tarval - improved hash_SymConst(): no need for mode, handle labels right [r25826] --- ir/ir/iropt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 25d0cd8a1..f225d2522 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -6667,7 +6667,6 @@ static unsigned hash_Const(const ir_node *node) { /* special value for const, as they only differ in their tarval. */ h = HASH_PTR(node->attr.con.tv); - h = 9*h + HASH_PTR(get_irn_mode(node)); return h; } /* hash_Const */ @@ -6679,8 +6678,12 @@ static unsigned hash_SymConst(const ir_node *node) { unsigned h; /* special value for const, as they only differ in their symbol. */ - h = HASH_PTR(node->attr.symc.sym.type_p); - h = 9*h + HASH_PTR(get_irn_mode(node)); + if (node->attr.symc.kind == symconst_label) + h = (unsigned)node->attr.symc.sym.label; + else { + /* all others are pointers */ + h = HASH_PTR(node->attr.symc.sym.type_p); + } return h; } /* hash_SymConst */ -- 2.20.1