LLVM API Documentation

Public Member Functions
llvm::IntEqClasses Class Reference

#include <IntEqClasses.h>

List of all members.

Public Member Functions

 IntEqClasses (unsigned N=0)
 IntEqClasses - Create an equivalence class mapping for 0 .. N-1.
void grow (unsigned N)
void clear ()
void join (unsigned a, unsigned b)
unsigned findLeader (unsigned a) const
void compress ()
unsigned getNumClasses () const
unsigned operator[] (unsigned a) const
void uncompress ()

Detailed Description

Definition at line 28 of file IntEqClasses.h.


Constructor & Destructor Documentation

IntEqClasses - Create an equivalence class mapping for 0 .. N-1.

Definition at line 42 of file IntEqClasses.h.

References grow(), and N.


Member Function Documentation

void llvm::IntEqClasses::clear ( ) [inline]

clear - Clear all classes so that grow() will assign a unique class to every integer.

Definition at line 51 of file IntEqClasses.h.

References llvm::SmallVectorImpl< T >::clear().

compress - Compress equivalence classes by numbering them 0 .. M. This makes the equivalence class map immutable.

Definition at line 53 of file IntEqClasses.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::size().

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 46 of file IntEqClasses.cpp.

getNumClasses - Return the number of equivalence classes after compress() was called.

Definition at line 72 of file IntEqClasses.h.

Referenced by llvm::EdgeBundles::getNumBundles().

grow - Increase capacity to hold 0 .. N-1, putting new integers in unique equivalence classes. This requires an uncompressed map.

Definition at line 25 of file IntEqClasses.cpp.

References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::SmallVectorTemplateCommon< T, typename >::size().

Referenced by IntEqClasses().

void IntEqClasses::join ( unsigned  a,
unsigned  b 
)

join - Join the equivalence classes of a and b. After joining classes, findLeader(a) == findLeader(b). This requires an uncompressed map.

Definition at line 32 of file IntEqClasses.cpp.

unsigned llvm::IntEqClasses::operator[] ( unsigned  a) const [inline]

operator[] - Return a's equivalence class number, 0 .. getNumClasses()-1. This requires a compressed map.

Definition at line 76 of file IntEqClasses.h.

uncompress - Change back to the uncompressed representation that allows editing.

Definition at line 60 of file IntEqClasses.cpp.

References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().


The documentation for this class was generated from the following files: