15#ifndef LLVM_ADT_ENUMERATEDARRAY_H
16#define LLVM_ADT_ENUMERATEDARRAY_H
23template <
typename ValueType,
typename Enumeration,
24 Enumeration LargestEnum = Enumeration::Last,
typename IndexType = int,
25 IndexType
Size = 1 +
static_cast<IndexType
>(LargestEnum)>
42 for (IndexType IX = 0; IX <
Size; ++IX) {
48 for (IndexType IX = 0; IX <
Size; ++IX) {
49 Underlying[IX] = *(
Init.begin() + IX);
54 auto IX =
static_cast<IndexType
>(
Index);
55 assert(IX >= 0 && IX <
Size &&
"Index is out of bounds.");
56 return Underlying[IX];
return ToRemove size() > 0
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
EnumeratedArray(std::initializer_list< ValueType > Init)
const_iterator begin() const
const_reverse_iterator rbegin() const
std::reverse_iterator< iterator > reverse_iterator
EnumeratedArray()=default
EnumeratedArray(ValueType V)
const ValueType & operator[](Enumeration Index) const
const_iterator end() const
ValueType & operator[](Enumeration Index)
std::reverse_iterator< const_iterator > const_reverse_iterator
const_reverse_iterator rend() const
reverse_iterator rbegin()
This is an optimization pass for GlobalISel generic memory operations.
PointerUnion< const Value *, const PseudoSourceValue * > ValueType