Commit d313d45f by Andi Kleen Committed by Andi Kleen

Convert ipa-devirt to inchash

gcc/:

2014-07-31  Andi Kleen  <ak@linux.intel.com>

	* ipa-devirt.c (polymorphic_call_target_hasher::hash):
	Convert to inchash.

From-SVN: r213397
parent 1a4d8851
2014-07-31 Andi Kleen <ak@linux.intel.com> 2014-07-31 Andi Kleen <ak@linux.intel.com>
* ipa-devirt.c (polymorphic_call_target_hasher::hash):
Convert to inchash.
2014-07-31 Andi Kleen <ak@linux.intel.com>
* asan.c (asan_mem_ref_hasher::hash): Convert to inchash. * asan.c (asan_mem_ref_hasher::hash): Convert to inchash.
2014-07-31 Andi Kleen <ak@linux.intel.com> 2014-07-31 Andi Kleen <ak@linux.intel.com>
......
...@@ -1635,25 +1635,22 @@ struct polymorphic_call_target_hasher ...@@ -1635,25 +1635,22 @@ struct polymorphic_call_target_hasher
inline hashval_t inline hashval_t
polymorphic_call_target_hasher::hash (const value_type *odr_query) polymorphic_call_target_hasher::hash (const value_type *odr_query)
{ {
hashval_t hash; inchash::hash hstate (odr_query->otr_token);
hstate.add_wide_int (odr_query->type->id);
hstate.merge_hash (TYPE_UID (odr_query->context.outer_type));
hstate.add_wide_int (odr_query->context.offset);
hash = iterative_hash_host_wide_int
(odr_query->otr_token,
odr_query->type->id);
hash = iterative_hash_hashval_t (TYPE_UID (odr_query->context.outer_type),
hash);
hash = iterative_hash_host_wide_int (odr_query->context.offset, hash);
if (odr_query->context.speculative_outer_type) if (odr_query->context.speculative_outer_type)
{ {
hash = iterative_hash_hashval_t hstate.merge_hash (TYPE_UID (odr_query->context.speculative_outer_type));
(TYPE_UID (odr_query->context.speculative_outer_type), hash); hstate.add_wide_int (odr_query->context.speculative_offset);
hash = iterative_hash_host_wide_int (odr_query->context.speculative_offset,
hash);
} }
return iterative_hash_hashval_t hstate.add_flag (odr_query->context.maybe_in_construction);
(((int)odr_query->context.maybe_in_construction << 2) hstate.add_flag (odr_query->context.maybe_derived_type);
| ((int)odr_query->context.speculative_maybe_derived_type << 1) hstate.add_flag (odr_query->context.speculative_maybe_derived_type);
| (int)odr_query->context.maybe_derived_type, hash); hstate.commit_flag ();
return hstate.end ();
} }
/* Compare cache entries T1 and T2. */ /* Compare cache entries T1 and T2. */
......
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