LLVM  3.7.0
Public Types | Public Member Functions | List of all members
llvm::FoldingSet< T > Class Template Referencefinal

FoldingSet - This template class is used to instantiate a specialized implementation of the folding set to the node class T. More...

#include <FoldingSet.h>

Inheritance diagram for llvm::FoldingSet< T >:
[legend]
Collaboration diagram for llvm::FoldingSet< T >:
[legend]

Public Types

typedef FoldingSetIterator< Titerator
 
typedef FoldingSetIterator
< const T
const_iterator
 
typedef
FoldingSetBucketIterator< T
bucket_iterator
 

Public Member Functions

 FoldingSet (unsigned Log2InitSize=6)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bucket_iterator bucket_begin (unsigned hash)
 
bucket_iterator bucket_end (unsigned hash)
 
TGetOrInsertNode (Node *N)
 GetOrInsertNode - If there is an existing simple Node exactly equal to the specified node, return it. More...
 
TFindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos)
 FindNodeOrInsertPos - Look up the node specified by ID. More...
 
- Public Member Functions inherited from llvm::FoldingSetImpl
void clear ()
 clear - Remove all nodes from the folding set. More...
 
bool RemoveNode (Node *N)
 RemoveNode - Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set. More...
 
NodeGetOrInsertNode (Node *N)
 GetOrInsertNode - If there is an existing simple Node exactly equal to the specified node, return it. More...
 
NodeFindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos)
 FindNodeOrInsertPos - Look up the node specified by ID. More...
 
void InsertNode (Node *N, void *InsertPos)
 InsertNode - Insert the specified node into the folding set, knowing that it is not already in the folding set. More...
 
void InsertNode (Node *N)
 InsertNode - Insert the specified node into the folding set, knowing that it is not already in the folding set. More...
 
unsigned size () const
 size - Returns the number of nodes in the folding set. More...
 
bool empty () const
 empty - Returns true if there are no nodes in the folding set. More...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::FoldingSetImpl
 ~FoldingSetImpl ()
 
 FoldingSetImpl (unsigned Log2InitSize=6)
 
- Protected Attributes inherited from llvm::FoldingSetImpl
void ** Buckets
 Buckets - Array of bucket chains. More...
 
unsigned NumBuckets
 NumBuckets - Length of the Buckets array. More...
 
unsigned NumNodes
 NumNodes - Number of nodes in the folding set. More...
 

Detailed Description

template<class T>
class llvm::FoldingSet< T >

FoldingSet - This template class is used to instantiate a specialized implementation of the folding set to the node class T.

T must be a subclass of FoldingSetNode and implement a Profile function.

Definition at line 396 of file FoldingSet.h.

Member Typedef Documentation

Definition at line 431 of file FoldingSet.h.

template<class T>
typedef FoldingSetIterator<const T> llvm::FoldingSet< T >::const_iterator

Definition at line 427 of file FoldingSet.h.

template<class T>
typedef FoldingSetIterator<T> llvm::FoldingSet< T >::iterator

Definition at line 423 of file FoldingSet.h.

Constructor & Destructor Documentation

template<class T>
llvm::FoldingSet< T >::FoldingSet ( unsigned  Log2InitSize = 6)
inlineexplicit

Definition at line 419 of file FoldingSet.h.

Member Function Documentation

template<class T>
iterator llvm::FoldingSet< T >::begin ( )
inline

Definition at line 424 of file FoldingSet.h.

template<class T>
const_iterator llvm::FoldingSet< T >::begin ( ) const
inline

Definition at line 428 of file FoldingSet.h.

template<class T>
bucket_iterator llvm::FoldingSet< T >::bucket_begin ( unsigned  hash)
inline

Definition at line 433 of file FoldingSet.h.

template<class T>
bucket_iterator llvm::FoldingSet< T >::bucket_end ( unsigned  hash)
inline

Definition at line 437 of file FoldingSet.h.

template<class T>
iterator llvm::FoldingSet< T >::end ( )
inline

Definition at line 425 of file FoldingSet.h.

template<class T>
const_iterator llvm::FoldingSet< T >::end ( ) const
inline

Definition at line 429 of file FoldingSet.h.

template<class T>
T* llvm::FoldingSet< T >::FindNodeOrInsertPos ( const FoldingSetNodeID ID,
void *&  InsertPos 
)
inline

FindNodeOrInsertPos - Look up the node specified by ID.

If it exists, return it. If not, return the insertion token that will make insertion faster.

Definition at line 451 of file FoldingSet.h.

Referenced by llvm::ImmutableListFactory< T >::concat(), llvm::BitsInit::get(), llvm::ListInit::get(), and llvm::DagInit::get().

template<class T>
T* llvm::FoldingSet< T >::GetOrInsertNode ( Node N)
inline

GetOrInsertNode - If there is an existing simple Node exactly equal to the specified node, return it.

Otherwise, insert 'N' and return it instead.

Definition at line 444 of file FoldingSet.h.


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