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]];
unsigned findLeader(unsigned a) const
findLeader - Compute the leader of a's equivalence class.
void grow(unsigned N)
grow - Increase capacity to hold 0 .
This class represents lattice values for constants.
void push_back(const T &Elt)
void compress()
compress - Compress equivalence classes by numbering them 0 .
void reserve(size_type N)
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.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())