LLVM API Documentation

Classes | Namespaces | Functions | Variables
Hashing.h File Reference
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/type_traits.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iterator>
#include <utility>
Include dependency graph for Hashing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::hash_code
 An opaque object representing a hash code. More...
struct  llvm::hashing::detail::hash_state
 The intermediate state used during hashing. Currently, the algorithm for computing hash codes is based on CityHash and keeps 56 bytes of arbitrary state. More...
struct  llvm::hashing::detail::is_hashable_data< T >
 Trait to indicate whether a type's bits can be hashed directly. More...
struct  llvm::hashing::detail::is_hashable_data< std::pair< T, U > >
struct  llvm::hashing::detail::hash_combine_recursive_helper
 Helper class to manage the recursive combining of hash_combine arguments. More...

Namespaces

namespace  llvm
 

List of target independent CodeGen pass IDs.


namespace  llvm::hashing
namespace  llvm::hashing::detail

Functions

template<typename T >
std::enable_if
< is_integral_or_enum< T >
::value, hash_code >::type 
llvm::hash_value (T value)
 Compute a hash_code for any integer value.
template<typename T >
hash_code llvm::hash_value (const T *ptr)
 Compute a hash_code for a pointer's address.
template<typename T , typename U >
hash_code llvm::hash_value (const std::pair< T, U > &arg)
 Compute a hash_code for a pair of objects.
template<typename T >
hash_code llvm::hash_value (const std::basic_string< T > &arg)
 Compute a hash_code for a standard string.
void llvm::set_fixed_execution_hash_seed (size_t fixed_value)
 Override the execution seed with a fixed value.
uint64_t llvm::hashing::detail::fetch64 (const char *p)
uint32_t llvm::hashing::detail::fetch32 (const char *p)
uint64_t llvm::hashing::detail::rotate (uint64_t val, size_t shift)
 Bitwise right rotate. Normally this will compile to a single instruction, especially if the shift is a manifest constant.
uint64_t llvm::hashing::detail::shift_mix (uint64_t val)
uint64_t llvm::hashing::detail::hash_16_bytes (uint64_t low, uint64_t high)
uint64_t llvm::hashing::detail::hash_1to3_bytes (const char *s, size_t len, uint64_t seed)
uint64_t llvm::hashing::detail::hash_4to8_bytes (const char *s, size_t len, uint64_t seed)
uint64_t llvm::hashing::detail::hash_9to16_bytes (const char *s, size_t len, uint64_t seed)
uint64_t llvm::hashing::detail::hash_17to32_bytes (const char *s, size_t len, uint64_t seed)
uint64_t llvm::hashing::detail::hash_33to64_bytes (const char *s, size_t len, uint64_t seed)
uint64_t llvm::hashing::detail::hash_short (const char *s, size_t length, uint64_t seed)
size_t llvm::hashing::detail::get_execution_seed ()
template<typename T >
std::enable_if
< is_hashable_data< T >::value,
T >::type 
llvm::hashing::detail::get_hashable_data (const T &value)
 Helper to get the hashable data representation for a type. This variant is enabled when the type itself can be used.
template<typename T >
bool llvm::hashing::detail::store_and_advance (char *&buffer_ptr, char *buffer_end, const T &value, size_t offset=0)
 Helper to store data from a value into a buffer and advance the pointer into that buffer.
template<typename InputIteratorT >
hash_code llvm::hashing::detail::hash_combine_range_impl (InputIteratorT first, InputIteratorT last)
 Implement the combining of integral values into a hash_code.
template<typename ValueT >
std::enable_if
< is_hashable_data< ValueT >
::value, hash_code >::type 
llvm::hashing::detail::hash_combine_range_impl (ValueT *first, ValueT *last)
 Implement the combining of integral values into a hash_code.
template<typename InputIteratorT >
hash_code llvm::hash_combine_range (InputIteratorT first, InputIteratorT last)
 Compute a hash_code for a sequence of values.
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
hash_code llvm::hash_combine (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6)
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
hash_code llvm::hash_combine (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5)
template<typename T1 , typename T2 , typename T3 , typename T4 >
hash_code llvm::hash_combine (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4)
template<typename T1 , typename T2 , typename T3 >
hash_code llvm::hash_combine (const T1 &arg1, const T2 &arg2, const T3 &arg3)
template<typename T1 , typename T2 >
hash_code llvm::hash_combine (const T1 &arg1, const T2 &arg2)
template<typename T1 >
hash_code llvm::hash_combine (const T1 &arg1)
hash_code llvm::hashing::detail::hash_integer_value (uint64_t value)
 Helper to hash the value of a single integer.

Variables

static const uint64_t llvm::hashing::detail::k0 = 0xc3a5c85c97cb3127ULL
 Some primes between 2^63 and 2^64 for various uses.
static const uint64_t llvm::hashing::detail::k1 = 0xb492b66fbe98f273ULL
static const uint64_t llvm::hashing::detail::k2 = 0x9ae16a3b2f90404fULL
static const uint64_t llvm::hashing::detail::k3 = 0xc949d7c7509e6557ULL
size_t llvm::hashing::detail::fixed_seed_override = 0
 A global, fixed seed-override variable.