From 59b2c1346ff67fde282beebca8ae5396fbdcc6f2 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 23 Feb 2018 19:27:28 +0100 Subject: [PATCH] ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and p->max as pointers rather than using iterative_hash_expr. * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and p->max as pointers rather than using iterative_hash_expr. From-SVN: r257940 --- gcc/ChangeLog | 5 +++++ gcc/ipa-prop.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d6c3a24f70c..eca766ca775 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-02-23 Jakub Jelinek + + * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and + p->max as pointers rather than using iterative_hash_expr. + 2018-02-23 Carl Love * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2 diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index b9714fb899a..38441cc49bc 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -111,12 +111,13 @@ struct ipa_vr_ggc_hash_traits : public ggc_cache_remove typedef value_range *compare_type; static hashval_t hash (const value_range *p) - { - gcc_checking_assert (!p->equiv); - hashval_t t = (hashval_t) p->type; - t = iterative_hash_expr (p->min, t); - return iterative_hash_expr (p->max, t); - } + { + gcc_checking_assert (!p->equiv); + inchash::hash hstate (p->type); + hstate.add_ptr (p->min); + hstate.add_ptr (p->max); + return hstate.end (); + } static bool equal (const value_range *a, const value_range *b) { -- 2.30.2