diff options
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index e0ac936..59853c8 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -133,6 +133,7 @@ along with GCC; see the file COPYING3. If not see #include "expr.h" #include "insn-codes.h" #include "optabs.h" +#include "tree-hash-traits.h" /* List of basic blocks in if-conversion-suitable order. */ static basic_block *ifc_bbs; @@ -1588,27 +1589,9 @@ convert_scalar_cond_reduction (gimple reduc, gimple_stmt_iterator *gsi, return rhs; } -/* Helpers for PHI arguments hashtable map. */ +typedef simple_hashmap_traits <tree_operand_hash> phi_args_hash_traits; -struct phi_args_hash_traits : default_hashmap_traits -{ - static inline hashval_t hash (tree); - static inline bool equal_keys (tree, tree); -}; - -inline hashval_t -phi_args_hash_traits::hash (tree value) -{ - return iterative_hash_expr (value, 0); -} - -inline bool -phi_args_hash_traits::equal_keys (tree value1, tree value2) -{ - return operand_equal_p (value1, value2, 0); -} - - /* Produce condition for all occurrences of ARG in PHI node. */ +/* Produce condition for all occurrences of ARG in PHI node. */ static tree gen_phi_arg_condition (gphi *phi, vec<int> *occur, |