diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 17:15:44 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 17:15:44 +0000 |
commit | f4ff098af3cb440cf2d584ad0a74d01afbd98f8b (patch) | |
tree | eb230717d9cde4170f937a1e9235ca357475e5be /gcc/sanopt.c | |
parent | b837d1923826a45554502cbcb7f4b9ed56673da0 (diff) | |
download | gcc-f4ff098af3cb440cf2d584ad0a74d01afbd98f8b.tar.gz |
gcc/
* tree-hash-traits.h: New file.
(tree_operand_hash): New class.
* sanopt.c: Include tree-hash-traits.h.
(sanopt_tree_map_traits): Use tree_operand_hash.
* tree-if-conv.c: Include tree-hash-traits.h.
(phi_args_hash_traits): Use tree_operand_hash.
* tree-ssa-uncprop.c: Include tree-hash-traits.h.
(val_ssa_equiv_hash_traits): Use tree_operand_hash.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sanopt.c')
-rw-r--r-- | gcc/sanopt.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gcc/sanopt.c b/gcc/sanopt.c index e1c30e1d765..f0ca8e00dd8 100644 --- a/gcc/sanopt.c +++ b/gcc/sanopt.c @@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see #include "ubsan.h" #include "params.h" #include "tree-ssa-operands.h" +#include "tree-hash-traits.h" /* This is used to carry information about basic blocks. It is @@ -96,20 +97,7 @@ maybe_get_single_definition (tree t) return NULL_TREE; } -/* Traits class for tree hash maps below. */ - -struct sanopt_tree_map_traits : default_hashmap_traits -{ - static inline hashval_t hash (const_tree ref) - { - return iterative_hash_expr (ref, 0); - } - - static inline bool equal_keys (const_tree ref1, const_tree ref2) - { - return operand_equal_p (ref1, ref2, 0); - } -}; +typedef simple_hashmap_traits <tree_operand_hash> sanopt_tree_map_traits; /* Tree triplet for vptr_check_map. */ struct sanopt_tree_triplet |