LLVM
17.0.0git

#include "llvm/ADT/IntEqClasses.h"
Public Member Functions  
IntEqClasses (unsigned N=0)  
IntEqClasses  Create an equivalence class mapping for 0 .. N1. More...  
void  grow (unsigned N) 
grow  Increase capacity to hold 0 . More...  
void  clear () 
clear  Clear all classes so that grow() will assign a unique class to every integer. More...  
unsigned  join (unsigned a, unsigned b) 
Join the equivalence classes of a and b. More...  
unsigned  findLeader (unsigned a) const 
findLeader  Compute the leader of a's equivalence class. More...  
void  compress () 
compress  Compress equivalence classes by numbering them 0 . More...  
unsigned  getNumClasses () const 
getNumClasses  Return the number of equivalence classes after compress() was called. More...  
unsigned  operator[] (unsigned a) const 
operator[]  Return a's equivalence class number, 0 . More...  
void  uncompress () 
uncompress  Change back to the uncompressed representation that allows editing. More...  
Definition at line 28 of file IntEqClasses.h.

inline 
IntEqClasses  Create an equivalence class mapping for 0 .. N1.
Definition at line 42 of file IntEqClasses.h.

inline 
clear  Clear all classes so that grow() will assign a unique class to every integer.
Definition at line 51 of file IntEqClasses.h.
void IntEqClasses::compress  (  ) 
compress  Compress equivalence classes by numbering them 0 .
. M. This makes the equivalence class map immutable.
Definition at line 60 of file IntEqClasses.cpp.
References llvm::numbers::e, and i.
Referenced by llvm::SchedDFSImpl::finalize().
unsigned IntEqClasses::findLeader  (  unsigned  a  )  const 
findLeader  Compute the leader of a's equivalence class.
This is the smallest member of the class. This requires an uncompressed map.
Definition at line 53 of file IntEqClasses.cpp.
References assert().

inline 
getNumClasses  Return the number of equivalence classes after compress() was called.
Definition at line 72 of file IntEqClasses.h.
Referenced by llvm::SchedDFSImpl::finalize().
void IntEqClasses::grow  (  unsigned  N  ) 
grow  Increase capacity to hold 0 .
. N1, putting new integers in unique equivalence classes. This requires an uncompressed map.
Definition at line 25 of file IntEqClasses.cpp.
References assert(), N, and llvm::SmallVectorImpl< T >::reserve().
Referenced by IntEqClasses().
unsigned IntEqClasses::join  (  unsigned  a, 
unsigned  b  
) 
Join the equivalence classes of a and b.
After joining classes, findLeader(a) == findLeader(b). This requires an uncompressed map. Returns the new leader.
Definition at line 32 of file IntEqClasses.cpp.
Referenced by llvm::SchedDFSImpl::joinPredSubtree().

inline 
operator[]  Return a's equivalence class number, 0 .
. getNumClasses()1. This requires a compressed map.
Definition at line 76 of file IntEqClasses.h.
References assert().
void IntEqClasses::uncompress  (  ) 
uncompress  Change back to the uncompressed representation that allows editing.
Definition at line 67 of file IntEqClasses.cpp.
References llvm::numbers::e, and i.