|
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 |
| bool | erase (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. | |
| LLVM_ATTRIBUTE_NOINLINE T * | getOrInsert (T *N) |
| If there is an existing node exactly equal to the specified node, return it. | |
| T * | lookup (const FoldingSetNodeID &ID, FoldingSetInsertToken &Token) |
| Look up the node specified by ID. | |
| void | insert (T *N, FoldingSetInsertToken Token) |
| Insert the specified node into the folding set, knowing that it is not already in the folding set. | |
| void | insert (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. | |
| LLVM_ABI void | reserve (unsigned N) |
Grow the number of buckets so that we can hold at least N nodes before rebucketing. | |
| 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 bool | erase (FoldingSetNode *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. | |
| template<typename MatchFn> | |
| FoldingSetNode * | probe (uint32_t Hash, FoldingSetInsertToken &Token, MatchFn IsMatch) |
Walk the probe chain for Hash, offering each node whose cached hash matches to IsMatch. | |
| LLVM_ABI void | insert (FoldingSetNode *N, FoldingSetInsertToken Token) |
| Insert the specified node into the folding set, knowing that it is not already in the folding set. | |
| Static Protected Member Functions inherited from llvm::FoldingSetBase | |
| static FoldingSetInsertToken | makeInsertToken (uint32_t Hash) |
Wrap Hash, which must not be NotAHash, as the token insert takes. | |
| Protected Attributes inherited from llvm::FoldingSetBase | |
| FoldingSetNode ** | Buckets = nullptr |
| Array of node pointers; a null entry marks an empty slot. | |
| unsigned | NumBuckets = 0 |
| Length of the Buckets array. Always a power of 2. | |
| unsigned | NumNodes = 0 |
| Number of nodes in the folding set. | |
An implementation detail that lets us share code between FoldingSet and ContextualFoldingSet.
Definition at line 453 of file FoldingSet.h.
| using llvm::FoldingSetImpl< T, Trait >::const_iterator = FoldingSetIterator<const T> |
Definition at line 490 of file FoldingSet.h.
| using llvm::FoldingSetImpl< T, Trait >::iterator = FoldingSetIterator<T> |
Definition at line 483 of file FoldingSet.h.
|
inlineexplicit |
Definition at line 469 of file FoldingSet.h.
|
inlineexplicit |
Definition at line 474 of file FoldingSet.h.
|
default |
|
default |
|
inline |
Definition at line 485 of file FoldingSet.h.
|
inline |
Definition at line 492 of file FoldingSet.h.
|
inline |
Definition at line 486 of file FoldingSet.h.
|
inline |
Definition at line 495 of file FoldingSet.h.
|
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 501 of file FoldingSet.h.
|
inline |
If there is an existing node exactly equal to the specified node, return it.
Otherwise, insert 'N' and return it instead.
Out of line so that callers do not inherit the ID's inline storage; some of them recurse.
Definition at line 508 of file FoldingSet.h.
Referenced by llvm::FoldingSetImpl< T, Trait >< ListTy >::insert().
|
inline |
Insert the specified node into the folding set, knowing that it is not already in the folding set.
Definition at line 541 of file FoldingSet.h.
|
inline |
Insert the specified node into the folding set, knowing that it is not already in the folding set.
Token must come from lookup for an ID that N profiles identically to.
Definition at line 529 of file FoldingSet.h.
Referenced by llvm::RecordRecTy::get().
|
inline |
Look up the node specified by ID.
If it exists, return it and clear Token; otherwise return null and set Token for a subsequent insert.
Definition at line 520 of file FoldingSet.h.
Referenced by llvm::RecordRecTy::get(), and llvm::FoldingSetImpl< T, Trait >< ListTy >::getOrInsert().
|
default |