LLVM  8.0.1
Public Member Functions | List of all members
llvm::ContextualFoldingSet< T, Ctx > Class Template Referencefinal

ContextualFoldingSet - This template class is a further refinement of FoldingSet which provides a context argument when calling Profile on its nodes. More...

#include "llvm/ADT/FoldingSet.h"

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

Public Member Functions

 ContextualFoldingSet (Ctx Context, unsigned Log2InitSize=6)
 
Ctx getContext () const
 
- Public Member Functions inherited from llvm::FoldingSetImpl< T >
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bucket_iterator bucket_begin (unsigned hash)
 
bucket_iterator bucket_end (unsigned hash)
 
bool RemoveNode (T *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...
 
TGetOrInsertNode (T *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...
 
void InsertNode (T *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 (T *N)
 InsertNode - Insert the specified node into the folding set, knowing that it is not already in the folding set. More...
 
- Public Member Functions inherited from llvm::FoldingSetBase
void clear ()
 clear - Remove all nodes from 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...
 
void reserve (unsigned EltCount)
 reserve - Increase the number of buckets such that adding the EltCount-th node won't cause a rebucket operation. More...
 
unsigned capacity ()
 capacity - Returns the number of nodes permitted in the folding set before a rebucket operation is performed. More...
 

Additional Inherited Members

- Public Types inherited from llvm::FoldingSetImpl< T >
using iterator = FoldingSetIterator< T >
 
using const_iterator = FoldingSetIterator< const T >
 
using bucket_iterator = FoldingSetBucketIterator< T >
 
- Protected Member Functions inherited from llvm::FoldingSetImpl< T >
 FoldingSetImpl (unsigned Log2InitSize)
 
 FoldingSetImpl (FoldingSetImpl &&Arg)=default
 
FoldingSetImploperator= (FoldingSetImpl &&RHS)=default
 
 ~FoldingSetImpl ()=default
 
- Protected Member Functions inherited from llvm::FoldingSetBase
 FoldingSetBase (unsigned Log2InitSize=6)
 
 FoldingSetBase (FoldingSetBase &&Arg)
 
FoldingSetBaseoperator= (FoldingSetBase &&RHS)
 
 ~FoldingSetBase ()
 
virtual void GetNodeProfile (Node *N, FoldingSetNodeID &ID) const =0
 GetNodeProfile - Instantiations of the FoldingSet template implement this function to gather data bits for the given node. More...
 
virtual bool NodeEquals (Node *N, const FoldingSetNodeID &ID, unsigned IDHash, FoldingSetNodeID &TempID) const =0
 NodeEquals - Instantiations of the FoldingSet template implement this function to compare the given node with the given ID. More...
 
virtual unsigned ComputeNodeHash (Node *N, FoldingSetNodeID &TempID) const =0
 ComputeNodeHash - Instantiations of the FoldingSet template implement this function to compute a hash value for the given node. 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...
 
- Protected Attributes inherited from llvm::FoldingSetBase
void ** Buckets
 Buckets - Array of bucket chains. More...
 
unsigned NumBuckets
 NumBuckets - Length of the Buckets array. Always a power of 2. More...
 
unsigned NumNodes
 NumNodes - Number of nodes in the folding set. More...
 

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(FoldingSetNodeID &, Ctx);

Definition at line 516 of file FoldingSet.h.

Constructor & Destructor Documentation

◆ ContextualFoldingSet()

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

Definition at line 547 of file FoldingSet.h.

Member Function Documentation

◆ getContext()

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

Definition at line 550 of file FoldingSet.h.

References Context.


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