summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 51ef63b6bb2..3625bf5a0ce 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "obstack.h"
#include "toplev.h" /* get_random_seed */
#include "hashtab.h"
+#include "inchash.h"
#include "filenames.h"
#include "output.h"
#include "target.h"
@@ -4582,56 +4583,6 @@ build_decl_attribute_variant (tree ddecl, tree attribute)
return ddecl;
}
-/* Borrowed from hashtab.c iterative_hash implementation. */
-#define mix(a,b,c) \
-{ \
- a -= b; a -= c; a ^= (c>>13); \
- b -= c; b -= a; b ^= (a<< 8); \
- c -= a; c -= b; c ^= ((b&0xffffffff)>>13); \
- a -= b; a -= c; a ^= ((c&0xffffffff)>>12); \
- b -= c; b -= a; b = (b ^ (a<<16)) & 0xffffffff; \
- c -= a; c -= b; c = (c ^ (b>> 5)) & 0xffffffff; \
- a -= b; a -= c; a = (a ^ (c>> 3)) & 0xffffffff; \
- b -= c; b -= a; b = (b ^ (a<<10)) & 0xffffffff; \
- c -= a; c -= b; c = (c ^ (b>>15)) & 0xffffffff; \
-}
-
-
-/* Produce good hash value combining VAL and VAL2. */
-hashval_t
-iterative_hash_hashval_t (hashval_t val, hashval_t val2)
-{
- /* the golden ratio; an arbitrary value. */
- hashval_t a = 0x9e3779b9;
-
- mix (a, val, val2);
- return val2;
-}
-
-/* Produce good hash value combining VAL and VAL2. */
-hashval_t
-iterative_hash_host_wide_int (HOST_WIDE_INT val, hashval_t val2)
-{
- if (sizeof (HOST_WIDE_INT) == sizeof (hashval_t))
- return iterative_hash_hashval_t (val, val2);
- else
- {
- hashval_t a = (hashval_t) val;
- /* Avoid warnings about shifting of more than the width of the type on
- hosts that won't execute this path. */
- int zero = 0;
- hashval_t b = (hashval_t) (val >> (sizeof (hashval_t) * 8 + zero));
- mix (a, b, val2);
- if (sizeof (HOST_WIDE_INT) > 2 * sizeof (hashval_t))
- {
- hashval_t a = (hashval_t) (val >> (sizeof (hashval_t) * 16 + zero));
- hashval_t b = (hashval_t) (val >> (sizeof (hashval_t) * 24 + zero));
- mix (a, b, val2);
- }
- return val2;
- }
-}
-
/* Return a type like TTYPE except that its TYPE_ATTRIBUTE
is ATTRIBUTE and its qualifiers are QUALS.