Commit e5ea9ef5 authored by Michael Beck's avatar Michael Beck
Browse files

- 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]
parent 4d9e97d1
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment