LLVM  10.0.0
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
llvm::ImutAVLFactory< ImutInfo > Class Template Reference

#include "llvm/ADT/ImmutableSet.h"

Public Member Functions

 ImutAVLFactory ()
 
 ImutAVLFactory (BumpPtrAllocator &Alloc)
 
 ~ImutAVLFactory ()
 
TreeTy * add (TreeTy *T, value_type_ref V)
 
TreeTy * remove (TreeTy *T, key_type_ref V)
 
TreeTy * getEmptyTree () const
 
TreeTy * getCanonicalTree (TreeTy *TNew)
 

Protected Member Functions

bool isEmpty (TreeTy *T) const
 
unsigned getHeight (TreeTy *T) const
 
TreeTy * getLeft (TreeTy *T) const
 
TreeTy * getRight (TreeTy *T) const
 
value_type_ref getValue (TreeTy *T) const
 
unsigned incrementHeight (TreeTy *L, TreeTy *R) const
 
TreeTy * createNode (TreeTy *L, value_type_ref V, TreeTy *R)
 
TreeTy * createNode (TreeTy *newLeft, TreeTy *oldTree, TreeTy *newRight)
 
void recoverNodes ()
 
TreeTy * balanceTree (TreeTy *L, value_type_ref V, TreeTy *R)
 balanceTree - Used by add_internal and remove_internal to balance a newly created tree. More...
 
TreeTy * add_internal (value_type_ref V, TreeTy *T)
 add_internal - Creates a new tree that includes the specified data and the data from the original tree. More...
 
TreeTy * remove_internal (key_type_ref K, TreeTy *T)
 remove_internal - Creates a new tree that includes all the data from the original tree except the specified data. More...
 
TreeTy * combineTrees (TreeTy *L, TreeTy *R)
 
TreeTy * removeMinBinding (TreeTy *T, TreeTy *&Noderemoved)
 
void markImmutable (TreeTy *T)
 markImmutable - Clears the mutable bits of a root and all of its descendants. More...
 

Static Protected Member Functions

static unsigned maskCacheIndex (unsigned I)
 
static bool compareTreeWithSection (TreeTy *T, typename TreeTy::iterator &TI, typename TreeTy::iterator &TE)
 

Friends

class ImutAVLTree< ImutInfo >
 

Detailed Description

template<typename ImutInfo>
class llvm::ImutAVLFactory< ImutInfo >

Definition at line 35 of file ImmutableSet.h.

Constructor & Destructor Documentation

◆ ImutAVLFactory() [1/2]

template<typename ImutInfo >
llvm::ImutAVLFactory< ImutInfo >::ImutAVLFactory ( )
inline

Definition at line 391 of file ImmutableSet.h.

◆ ImutAVLFactory() [2/2]

template<typename ImutInfo >
llvm::ImutAVLFactory< ImutInfo >::ImutAVLFactory ( BumpPtrAllocator &  Alloc)
inline

Definition at line 394 of file ImmutableSet.h.

◆ ~ImutAVLFactory()

template<typename ImutInfo >
llvm::ImutAVLFactory< ImutInfo >::~ImutAVLFactory ( )
inline

Definition at line 397 of file ImmutableSet.h.

Member Function Documentation

◆ add()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::add ( TreeTy *  T,
value_type_ref  V 
)
inline

◆ add_internal()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::add_internal ( value_type_ref  V,
TreeTy *  T 
)
inlineprotected

add_internal - Creates a new tree that includes the specified data and the data from the original tree.

If the original tree already contained the data item, the original tree is returned.

Definition at line 536 of file ImmutableSet.h.

References assert(), llvm::ImutAVLTree< ImutInfo >::getLeft(), llvm::ImutAVLTree< ImutInfo >::getRight(), llvm::ImutAVLTree< ImutInfo >::getValue(), and isEqual().

◆ balanceTree()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::balanceTree ( TreeTy *  L,
value_type_ref  V,
TreeTy *  R 
)
inlineprotected

balanceTree - Used by add_internal and remove_internal to balance a newly created tree.

Definition at line 492 of file ImmutableSet.h.

References assert(), llvm::ImutAVLTree< ImutInfo >::getHeight(), llvm::ImutAVLTree< ImutInfo >::getLeft(), and llvm::ImutAVLTree< ImutInfo >::getRight().

◆ combineTrees()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::combineTrees ( TreeTy *  L,
TreeTy *  R 
)
inlineprotected

◆ compareTreeWithSection()

template<typename ImutInfo >
static bool llvm::ImutAVLFactory< ImutInfo >::compareTreeWithSection ( TreeTy *  T,
typename TreeTy::iterator &  TI,
typename TreeTy::iterator &  TE 
)
inlinestaticprotected

◆ createNode() [1/2]

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::createNode ( TreeTy *  L,
value_type_ref  V,
TreeTy *  R 
)
inlineprotected

◆ createNode() [2/2]

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::createNode ( TreeTy *  newLeft,
TreeTy *  oldTree,
TreeTy *  newRight 
)
inlineprotected

Definition at line 477 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getValue().

◆ getCanonicalTree()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::getCanonicalTree ( TreeTy *  TNew)
inline

◆ getEmptyTree()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::getEmptyTree ( ) const
inline

◆ getHeight()

template<typename ImutInfo >
unsigned llvm::ImutAVLFactory< ImutInfo >::getHeight ( TreeTy *  T) const
inlineprotected

Definition at line 426 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getHeight().

◆ getLeft()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::getLeft ( TreeTy *  T) const
inlineprotected

Definition at line 427 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getLeft().

◆ getRight()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::getRight ( TreeTy *  T) const
inlineprotected

Definition at line 428 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getRight().

◆ getValue()

template<typename ImutInfo >
value_type_ref llvm::ImutAVLFactory< ImutInfo >::getValue ( TreeTy *  T) const
inlineprotected

Definition at line 429 of file ImmutableSet.h.

◆ incrementHeight()

template<typename ImutInfo >
unsigned llvm::ImutAVLFactory< ImutInfo >::incrementHeight ( TreeTy *  L,
TreeTy *  R 
) const
inlineprotected

Definition at line 434 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getHeight().

◆ isEmpty()

template<typename ImutInfo >
bool llvm::ImutAVLFactory< ImutInfo >::isEmpty ( TreeTy *  T) const
inlineprotected

Definition at line 425 of file ImmutableSet.h.

References llvm::T.

◆ markImmutable()

template<typename ImutInfo >
void llvm::ImutAVLFactory< ImutInfo >::markImmutable ( TreeTy *  T)
inlineprotected

markImmutable - Clears the mutable bits of a root and all of its descendants.

Definition at line 597 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::getLeft(), and llvm::ImutAVLTree< ImutInfo >::getRight().

◆ maskCacheIndex()

template<typename ImutInfo >
static unsigned llvm::ImutAVLFactory< ImutInfo >::maskCacheIndex ( unsigned  I)
inlinestaticprotected

Definition at line 432 of file ImmutableSet.h.

Referenced by llvm::ImutAVLTree< ImutInfo >::destroy().

◆ recoverNodes()

template<typename ImutInfo >
void llvm::ImutAVLFactory< ImutInfo >::recoverNodes ( )
inlineprotected

Definition at line 481 of file ImmutableSet.h.

References llvm::ImutAVLTree< ImutInfo >::destroy(), and N.

◆ remove()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::remove ( TreeTy *  T,
key_type_ref  V 
)
inline

◆ remove_internal()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::remove_internal ( key_type_ref  K,
TreeTy *  T 
)
inlineprotected

remove_internal - Creates a new tree that includes all the data from the original tree except the specified data.

If the specified data did not exist in the original tree, the original tree is returned.

Definition at line 556 of file ImmutableSet.h.

References assert(), llvm::ImutAVLTree< ImutInfo >::getLeft(), llvm::ImutAVLTree< ImutInfo >::getRight(), llvm::ImutAVLTree< ImutInfo >::getValue(), isEqual(), and llvm::T.

◆ removeMinBinding()

template<typename ImutInfo >
TreeTy* llvm::ImutAVLFactory< ImutInfo >::removeMinBinding ( TreeTy *  T,
TreeTy *&  Noderemoved 
)
inlineprotected

Friends And Related Function Documentation

◆ ImutAVLTree< ImutInfo >

template<typename ImutInfo >
friend class ImutAVLTree< ImutInfo >
friend

Definition at line 366 of file ImmutableSet.h.


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