25 assert(NumClasses == 0 &&
"grow() called after compress().");
32 assert(NumClasses == 0 &&
"join() called after compress().");
53 assert(NumClasses == 0 &&
"findLeader() called after compress().");
62 for (
unsigned i = 0,
e = EC.
size(); i !=
e; ++i)
63 EC[i] = (EC[i] == i) ? NumClasses++ : EC[EC[i]];
70 for (
unsigned i = 0,
e = EC.
size(); i !=
e; ++i)
71 if (EC[i] < Leader.
size())
72 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())