From: Jan Hubicka Date: Thu, 3 Jan 2019 12:23:27 +0000 (+0100) Subject: re PR lto/85574 (LTO bootstapped binaries differ) X-Git-Tag: basepoints/gcc-10~2003 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a62f44193ab95288311d162c45dbd31a7930281;p=thirdparty%2Fgcc.git re PR lto/85574 (LTO bootstapped binaries differ) 2019-01-03 Jan Hubicka PR tree-optimization/85574 * tree-ssa-uncprop.c (struct equiv_hash_elt): Remove unused structure. (struct ssa_equip_hash_traits): Declare. (val_ssa_equiv): Use custom hash traits using operand_equal_p. From-SVN: r267552 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4eec4b5e9872..1cf696b3503d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-01-03 Jan Hubicka + + PR tree-optimization/85574 + * tree-ssa-uncprop.c (struct equiv_hash_elt): Remove unused + structure. + (struct ssa_equip_hash_traits): Declare. + (val_ssa_equiv): Use custom hash traits using operand_equal_p. + 2019-01-03 Jakub Jelinek PR debug/88644 diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c index a6b7950f5ed0..b9b05ed1a2c2 100644 --- a/gcc/tree-ssa-uncprop.c +++ b/gcc/tree-ssa-uncprop.c @@ -268,21 +268,24 @@ associate_equivalences_with_edges (void) so with each value we have a list of SSA_NAMEs that have the same value. */ - -/* Main structure for recording equivalences into our hash table. */ -struct equiv_hash_elt +/* Traits for the hash_map to record the value to SSA name equivalences + mapping. */ +struct ssa_equip_hash_traits : default_hash_traits { - /* The value/key of this entry. */ - tree value; - - /* List of SSA_NAMEs which have the same value/key. */ - vec equivalences; + static inline hashval_t hash (value_type value) + { return iterative_hash_expr (value, 0); } + static inline bool equal (value_type existing, value_type candidate) + { return operand_equal_p (existing, candidate, 0); } }; +typedef hash_map, + simple_hashmap_traits > > val_ssa_equiv_t; + /* Global hash table implementing a mapping from invariant values to a list of SSA_NAMEs which have the same value. We might be able to reuse tree-vn for this code. */ -static hash_map > *val_ssa_equiv; +val_ssa_equiv_t *val_ssa_equiv; static void uncprop_into_successor_phis (basic_block); @@ -476,7 +479,7 @@ pass_uncprop::execute (function *fun) associate_equivalences_with_edges (); /* Create our global data structures. */ - val_ssa_equiv = new hash_map > (1024); + val_ssa_equiv = new val_ssa_equiv_t (1024); /* We're going to do a dominator walk, so ensure that we have dominance information. */