GCC Middle and Back End API Reference
inchash.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  inchash::hash
 

Namespaces

namespace  inchash
 

Macros

#define mix(a, b, c)
 

Functions

hashval_t iterative_hash_host_wide_int (HOST_WIDE_INT, hashval_t)
 
hashval_t iterative_hash_hashval_t (hashval_t, hashval_t)
 

Macro Definition Documentation

◆ mix

#define mix ( a,
b,
c )
Value:
{ \
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; \
}
Ca const poly_int< N, Cb > & b
Definition poly-int.h:767
Ca & a
Definition poly-int.h:766
Borrowed from hashtab.c iterative_hash implementation.   

Referenced by iterative_hash_hashval_t(), and iterative_hash_host_wide_int().

Function Documentation

◆ iterative_hash_hashval_t()

hashval_t iterative_hash_hashval_t ( hashval_t val,
hashval_t val2 )
inline
Produce good hash value combining VAL and VAL2.   

References a, and mix.

Referenced by inchash::hash::add_int(), pair_hash< T1, T2 >::hash(), DFS::hash_scc(), iterative_hash_host_wide_int(), and inchash::hash::merge_hash().

◆ iterative_hash_host_wide_int()

hashval_t iterative_hash_host_wide_int ( HOST_WIDE_INT val,
hashval_t val2 )
inline
An incremental hash abstract data type.
   Copyright (C) 2014-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
This file implements an incremential hash function ADT, to be used
by code that incrementially hashes a lot of unrelated data
(not in a single memory block) into a single value. The goal
is to make it easy to plug in efficient hash algorithms.
Currently it just implements the plain old jhash based
incremental hash from gcc's tree.cc.   
Produce good hash value combining VAL and VAL2.   

References a, b, iterative_hash_hashval_t(), and mix.

Referenced by inchash::hash::add_hwi(), gather_mem_refs_stmt(), int_cst_hasher::hash(), and ipa_icf::sem_function::init().