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]];
Equivalence classes for small integers.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned findLeader(unsigned a) const
findLeader - Compute the leader of a's equivalence class.
void compress()
compress - Compress equivalence classes by numbering them 0 .
void uncompress()
uncompress - Change back to the uncompressed representation that allows editing.
unsigned join(unsigned a, unsigned b)
Join the equivalence classes of a and b.
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.