|
LLVM 24.0.0git
|
An implementation detail that lets us share code between FoldingSet and ContextualFoldingSet. More...
#include "llvm/ADT/FoldingSet.h"
Public Types | |
| using | iterator = FoldingSetIterator<T> |
| using | const_iterator = FoldingSetIterator<const T> |
Public Member Functions | |
| FoldingSetImpl (unsigned Log2InitSize=6) | |
| template<typename C, typename = std::enable_if_t<std::is_constructible_v< typename Trait::ContextStorage, C>>> | |
| FoldingSetImpl (C &&Context, unsigned Log2InitSize=6) | |
| FoldingSetImpl (FoldingSetImpl &&Arg)=default | |
| FoldingSetImpl & | operator= (FoldingSetImpl &&RHS)=default |
| ~FoldingSetImpl ()=default | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | reserve (unsigned EltCount) |
Grow the number of buckets so that we can hold at least EltCount nodes before rebucketing. | |
| bool | RemoveNode (T *N) |
| Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set. | |
| T * | GetOrInsertNode (T *N) |
| If there is an existing node exactly equal to the specified node, return it. | |
| T * | FindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos) |
| Look up the node specified by ID. | |
| void | InsertNode (T *N, void *InsertPos) |
| Insert the specified node into the folding set, knowing that it is not already in the folding set. | |
| void | InsertNode (T *N) |
| Insert the specified node into the folding set, knowing that it is not already in the folding set. | |
| Public Member Functions inherited from llvm::FoldingSetBase | |
| LLVM_ABI void | clear () |
| Remove all nodes from the folding set. | |
| unsigned | size () const |
| Returns the number of nodes in the folding set. | |
| bool | empty () const |
| Returns true if there are no nodes in the folding set. | |
| unsigned | capacity () const |
| Returns the number of nodes permitted in the folding set before a rebucket operation is performed. | |
| Public Member Functions inherited from llvm::DebugEpochBase | |
| void | incrementEpoch () |
Additional Inherited Members | |
| Protected Member Functions inherited from llvm::FoldingSetBase | |
| LLVM_ABI | FoldingSetBase (unsigned Log2InitSize) |
| LLVM_ABI | FoldingSetBase (FoldingSetBase &&Arg) |
| LLVM_ABI FoldingSetBase & | operator= (FoldingSetBase &&RHS) |
| LLVM_ABI | ~FoldingSetBase () |
| LLVM_ABI void | reserve (unsigned EltCount, const FoldingSetInfo &Info) |
Grow the number of buckets so that we can hold at least EltCount nodes before rebucketing. | |
| LLVM_ABI bool | RemoveNode (Node *N) |
| Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set. | |
| LLVM_ABI Node * | GetOrInsertNode (Node *N, const FoldingSetInfo &Info) |
If there is an existing node exactly equal to the node N, return it. | |
| LLVM_ABI Node * | FindNodeOrInsertPos (const FoldingSetNodeID &ID, void *&InsertPos, const FoldingSetInfo &Info) |
| Look up the node specified by ID. | |
| LLVM_ABI void | InsertNode (Node *N, void *InsertPos, const FoldingSetInfo &Info) |
| Insert the specified node into the folding set, knowing that it is not already in the folding set. | |
| Protected Attributes inherited from llvm::FoldingSetBase | |
| void ** | Buckets |
| Array of bucket chains. | |
| unsigned | NumBuckets |
| Length of the Buckets array. Always a power of 2. | |
| unsigned | NumNodes |
| Number of nodes in the folding set. | |
An implementation detail that lets us share code between FoldingSet and ContextualFoldingSet.
Definition at line 443 of file FoldingSet.h.
| using llvm::FoldingSetImpl< T, Trait >::const_iterator = FoldingSetIterator<const T> |
Definition at line 503 of file FoldingSet.h.
| using llvm::FoldingSetImpl< T, Trait >::iterator = FoldingSetIterator<T> |
Definition at line 498 of file FoldingSet.h.
|
inlineexplicit |
Definition at line 484 of file FoldingSet.h.
|
inlineexplicit |
Definition at line 489 of file FoldingSet.h.
|
default |
|
default |
|
inline |
Definition at line 500 of file FoldingSet.h.
|
inline |
Definition at line 505 of file FoldingSet.h.
|
inline |
Definition at line 501 of file FoldingSet.h.
|
inline |
Definition at line 506 of file FoldingSet.h.
|
inline |
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 529 of file FoldingSet.h.
Referenced by llvm::RecordRecTy::get().
|
inline |
If there is an existing node exactly equal to the specified node, return it.
Otherwise, insert 'N' and return it instead.
Definition at line 522 of file FoldingSet.h.
Referenced by llvm::FoldingSetImpl< T, Trait >< ListTy >::InsertNode().
|
inline |
Insert the specified node into the folding set, knowing that it is not already in the folding set.
Definition at line 543 of file FoldingSet.h.
|
inline |
Insert the specified node into the folding set, knowing that it is not already in the folding set.
InsertPos must be obtained from FindNodeOrInsertPos.
Definition at line 537 of file FoldingSet.h.
Referenced by llvm::RecordRecTy::get().
|
default |
|
inline |
Remove a node from the folding set, returning true if one was removed or false if the node was not in the folding set.
Definition at line 518 of file FoldingSet.h.
|
inline |
Grow the number of buckets so that we can hold at least EltCount nodes before rebucketing.
May allocate more space than requested.
Definition at line 512 of file FoldingSet.h.