9#ifndef LLVM_ADT_TRIEHASHINDEXGENERATOR_H
10#define LLVM_ADT_TRIEHASHINDEXGENERATOR_H
83 size_t end()
const {
return SIZE_MAX; }
97 size_t ByteStart = 0, ByteEnd = 8;
100 Byte &= (1u << (8 -
StartBit)) - 1u;
103 size_t CurrentNumBits = ByteEnd - ByteStart;
104 if (CurrentNumBits > NumBits) {
105 Byte >>= CurrentNumBits - NumBits;
106 CurrentNumBits = NumBits;
108 Index <<= CurrentNumBits;
109 Index |= Byte & ((1u << CurrentNumBits) - 1u);
111 assert(NumBits >= CurrentNumBits);
112 NumBits -= CurrentNumBits;
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
size_t size() const
size - Get the array size.
This is an optimization pass for GlobalISel generic memory operations.
The utility class that helps computing the index of the object inside trie from its hash.
std::optional< size_t > StartBit
ArrayRef< uint8_t > Bytes
size_t getNumBits() const
size_t getCollidingBits(ArrayRef< uint8_t > CollidingBits) const
static size_t getIndex(ArrayRef< uint8_t > Bytes, size_t StartBit, size_t NumBits)
size_t hint(unsigned Index, unsigned Bit)