26 assert(NumClasses == 0 &&
"grow() called after compress().");
33 assert(NumClasses == 0 &&
"join() called after compress().");
54 assert(NumClasses == 0 &&
"findLeader() called after compress().");
63 for (
unsigned i = 0, e = EC.
size(); i != e; ++i)
64 EC[i] = (EC[i] == i) ? NumClasses++ : EC[EC[i]];
71 for (
unsigned i = 0, e = EC.
size(); i != e; ++i)
72 if (EC[i] < Leader.
size())
73 EC[i] = Leader[EC[i]];
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Equivalence classes for small integers.
LLVM_ABI unsigned findLeader(unsigned a) const
findLeader - Compute the leader of a's equivalence class.
LLVM_ABI void compress()
compress - Compress equivalence classes by numbering them 0 .
LLVM_ABI void uncompress()
uncompress - Change back to the uncompressed representation that allows editing.
LLVM_ABI unsigned join(unsigned a, unsigned b)
Join the equivalence classes of a and b.
LLVM_ABI void grow(unsigned N)
grow - Increase capacity to hold 0 .
void reserve(size_type N)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.