An incremental hash abstract data type.
Copyright (C) 2014-2025 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().