LLVM 18.0.0git
|
FoldingSetNodeID - This class is used to gather all the unique data bits of a node. More...
#include "llvm/ADT/FoldingSet.h"
Public Member Functions | |
FoldingSetNodeID ()=default | |
FoldingSetNodeID (FoldingSetNodeIDRef Ref) | |
void | AddPointer (const void *Ptr) |
Add* - Add various data types to Bit data. | |
void | AddInteger (signed I) |
void | AddInteger (unsigned I) |
void | AddInteger (long I) |
void | AddInteger (unsigned long I) |
void | AddInteger (long long I) |
void | AddInteger (unsigned long long I) |
void | AddBoolean (bool B) |
void | AddString (StringRef String) |
Add* - Add various data types to Bit data. | |
void | AddNodeID (const FoldingSetNodeID &ID) |
template<typename T > | |
void | Add (const T &x) |
void | clear () |
clear - Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile. | |
unsigned | ComputeHash () const |
ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to lookup the node in the FoldingSetBase. | |
bool | operator== (const FoldingSetNodeID &RHS) const |
operator== - Used to compare two nodes to each other. | |
bool | operator== (const FoldingSetNodeIDRef RHS) const |
operator== - Used to compare two nodes to each other. | |
bool | operator!= (const FoldingSetNodeID &RHS) const |
bool | operator!= (const FoldingSetNodeIDRef RHS) const |
bool | operator< (const FoldingSetNodeID &RHS) const |
Used to compare the "ordering" of two nodes as defined by the profiled bits and their ordering defined by memcmp(). | |
bool | operator< (const FoldingSetNodeIDRef RHS) const |
FoldingSetNodeIDRef | Intern (BumpPtrAllocator &Allocator) const |
Intern - Copy this node's data to a memory region allocated from the given allocator and return a FoldingSetNodeIDRef describing the interned data. | |
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
When all the bits are gathered this class is used to produce a hash value for the node.
Definition at line 318 of file FoldingSet.h.
|
default |
|
inline |
Definition at line 326 of file FoldingSet.h.
Definition at line 362 of file FoldingSet.h.
References llvm::DefaultFoldingSetTrait< T >::Profile().
Referenced by llvm::APFloat::Profile().
|
inline |
Definition at line 357 of file FoldingSet.h.
References AddInteger(), and B.
|
inline |
Definition at line 341 of file FoldingSet.h.
References AddInteger(), and I.
Referenced by AddInteger().
|
inline |
Definition at line 351 of file FoldingSet.h.
References AddInteger(), and I.
Referenced by AddInteger().
|
inline |
Definition at line 339 of file FoldingSet.h.
References I.
Referenced by AddBoolean(), AddInteger(), and AddPointer().
|
inline |
Definition at line 340 of file FoldingSet.h.
References I.
|
inline |
Definition at line 342 of file FoldingSet.h.
References AddInteger(), I, and llvm_unreachable.
|
inline |
Definition at line 352 of file FoldingSet.h.
References AddInteger(), and I.
void FoldingSetNodeID::AddNodeID | ( | const FoldingSetNodeID & | ID | ) |
Definition at line 102 of file FoldingSet.cpp.
References llvm::SmallVectorImpl< T >::append().
|
inline |
Add* - Add various data types to Bit data.
Definition at line 330 of file FoldingSet.h.
References AddInteger(), and Ptr.
void FoldingSetNodeID::AddString | ( | StringRef | String | ) |
Add* - Add various data types to Bit data.
Definition at line 45 of file FoldingSet.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::sampleprof::Base, llvm::divideCeil(), llvm::sys::IsBigEndianHost, llvm::sys::IsLittleEndianHost, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::SmallVectorBase< Size_T >::size(), Size, and llvm::String.
|
inline |
clear - Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile.
Definition at line 366 of file FoldingSet.h.
Referenced by llvm::FoldingSetBase::FindNodeOrInsertPos().
|
inline |
ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to lookup the node in the FoldingSetBase.
Definition at line 370 of file FoldingSet.h.
References llvm::FoldingSetNodeIDRef::ComputeHash().
Referenced by llvm::DefaultFoldingSetTrait< T >::ComputeHash(), and llvm::DefaultContextualFoldingSetTrait< T, Ctx >::ComputeHash().
FoldingSetNodeIDRef FoldingSetNodeID::Intern | ( | BumpPtrAllocator & | Allocator | ) | const |
Intern - Copy this node's data to a memory region allocated from the given allocator and return a FoldingSetNodeIDRef describing the interned data.
Definition at line 132 of file FoldingSet.cpp.
References Allocator, llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::SmallVectorBase< Size_T >::size().
|
inline |
Definition at line 378 of file FoldingSet.h.
References RHS.
|
inline |
Definition at line 379 of file FoldingSet.h.
References RHS.
bool FoldingSetNodeID::operator< | ( | const FoldingSetNodeID & | RHS | ) | const |
Used to compare the "ordering" of two nodes as defined by the profiled bits and their ordering defined by memcmp().
Definition at line 120 of file FoldingSet.cpp.
References RHS.
bool FoldingSetNodeID::operator< | ( | const FoldingSetNodeIDRef | RHS | ) | const |
Definition at line 124 of file FoldingSet.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::data(), RHS, and llvm::SmallVectorBase< Size_T >::size().
bool FoldingSetNodeID::operator== | ( | const FoldingSetNodeID & | RHS | ) | const |
operator== - Used to compare two nodes to each other.
Definition at line 108 of file FoldingSet.cpp.
References RHS.
bool FoldingSetNodeID::operator== | ( | const FoldingSetNodeIDRef | RHS | ) | const |
operator== - Used to compare two nodes to each other.
Definition at line 114 of file FoldingSet.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::data(), RHS, and llvm::SmallVectorBase< Size_T >::size().