LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
llvm::ContextualFoldingSet< T, Ctx > Class Template Reference

#include <FoldingSet.h>

Inheritance diagram for llvm::ContextualFoldingSet< T, Ctx >:
Inheritance graph
[legend]
Collaboration diagram for llvm::ContextualFoldingSet< T, Ctx >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 ContextualFoldingSet (Ctx Context, unsigned Log2InitSize=6)
 
Ctx getContext () const
 
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)
 
TFindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos)
 
- Public Member Functions inherited from llvm::FoldingSetImpl
 FoldingSetImpl (unsigned Log2InitSize=6)
 
virtual ~FoldingSetImpl ()
 
void clear ()
 clear - Remove all nodes from the folding set. More...
 
bool RemoveNode (Node *N)
 
NodeGetOrInsertNode (Node *N)
 
NodeFindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos)
 
void InsertNode (Node *N, void *InsertPos)
 
void InsertNode (Node *N)
 
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 Attributes inherited from llvm::FoldingSetImpl
void ** Buckets
 
unsigned NumBuckets
 
unsigned NumNodes
 

Detailed Description

template<class T, class Ctx>
class llvm::ContextualFoldingSet< T, Ctx >

ContextualFoldingSet - This template class is a further refinement of FoldingSet which provides a context argument when calling Profile on its nodes. Currently, that argument is fixed at initialization time.

T must be a subclass of FoldingSetNode and implement a Profile function with signature void Profile(llvm::FoldingSetNodeID &, Ctx);

Definition at line 460 of file FoldingSet.h.

Member Typedef Documentation

template<class T , class Ctx >
typedef FoldingSetBucketIterator<T> llvm::ContextualFoldingSet< T, Ctx >::bucket_iterator

Definition at line 505 of file FoldingSet.h.

template<class T , class Ctx >
typedef FoldingSetIterator<const T> llvm::ContextualFoldingSet< T, Ctx >::const_iterator

Definition at line 501 of file FoldingSet.h.

template<class T , class Ctx >
typedef FoldingSetIterator<T> llvm::ContextualFoldingSet< T, Ctx >::iterator

Definition at line 497 of file FoldingSet.h.

Constructor & Destructor Documentation

template<class T , class Ctx >
llvm::ContextualFoldingSet< T, Ctx >::ContextualFoldingSet ( Ctx  Context,
unsigned  Log2InitSize = 6 
)
inlineexplicit

Definition at line 490 of file FoldingSet.h.

Member Function Documentation

template<class T , class Ctx >
iterator llvm::ContextualFoldingSet< T, Ctx >::begin ( )
inline

Definition at line 498 of file FoldingSet.h.

References llvm::FoldingSetImpl::Buckets.

template<class T , class Ctx >
const_iterator llvm::ContextualFoldingSet< T, Ctx >::begin ( ) const
inline

Definition at line 502 of file FoldingSet.h.

References llvm::FoldingSetImpl::Buckets.

template<class T , class Ctx >
bucket_iterator llvm::ContextualFoldingSet< T, Ctx >::bucket_begin ( unsigned  hash)
inline
template<class T , class Ctx >
bucket_iterator llvm::ContextualFoldingSet< T, Ctx >::bucket_end ( unsigned  hash)
inline
template<class T , class Ctx >
iterator llvm::ContextualFoldingSet< T, Ctx >::end ( )
inline
template<class T , class Ctx >
const_iterator llvm::ContextualFoldingSet< T, Ctx >::end ( ) const
inline
template<class T , class Ctx >
T* llvm::ContextualFoldingSet< T, Ctx >::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 525 of file FoldingSet.h.

References llvm::FoldingSetImpl::FindNodeOrInsertPos().

template<class T , class Ctx >
Ctx llvm::ContextualFoldingSet< T, Ctx >::getContext ( ) const
inline

Definition at line 494 of file FoldingSet.h.

template<class T , class Ctx >
T* llvm::ContextualFoldingSet< T, Ctx >::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 518 of file FoldingSet.h.

References llvm::FoldingSetImpl::GetOrInsertNode().


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