LLVM 20.0.0git
Public Member Functions | List of all members
llvm::FoldingSetNodeID Class Reference

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
 
unsigned computeStableHash () const
 
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.
 

Detailed Description

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 327 of file FoldingSet.h.

Constructor & Destructor Documentation

◆ FoldingSetNodeID() [1/2]

llvm::FoldingSetNodeID::FoldingSetNodeID ( )
default

◆ FoldingSetNodeID() [2/2]

llvm::FoldingSetNodeID::FoldingSetNodeID ( FoldingSetNodeIDRef  Ref)
inline

Definition at line 335 of file FoldingSet.h.

Member Function Documentation

◆ Add()

template<typename T >
void llvm::FoldingSetNodeID::Add ( const T x)
inline

Definition at line 371 of file FoldingSet.h.

References llvm::DefaultFoldingSetTrait< T >::Profile().

Referenced by llvm::APFloat::Profile().

◆ AddBoolean()

void llvm::FoldingSetNodeID::AddBoolean ( bool  B)
inline

Definition at line 366 of file FoldingSet.h.

References AddInteger(), and B.

◆ AddInteger() [1/6]

void llvm::FoldingSetNodeID::AddInteger ( long  I)
inline

Definition at line 350 of file FoldingSet.h.

References AddInteger(), and I.

Referenced by AddInteger().

◆ AddInteger() [2/6]

void llvm::FoldingSetNodeID::AddInteger ( long long  I)
inline

Definition at line 360 of file FoldingSet.h.

References AddInteger(), and I.

Referenced by AddInteger().

◆ AddInteger() [3/6]

void llvm::FoldingSetNodeID::AddInteger ( signed  I)
inline

Definition at line 348 of file FoldingSet.h.

References I.

Referenced by AddBoolean(), AddInteger(), and AddPointer().

◆ AddInteger() [4/6]

void llvm::FoldingSetNodeID::AddInteger ( unsigned  I)
inline

Definition at line 349 of file FoldingSet.h.

References I.

◆ AddInteger() [5/6]

void llvm::FoldingSetNodeID::AddInteger ( unsigned long  I)
inline

Definition at line 351 of file FoldingSet.h.

References AddInteger(), I, and llvm_unreachable.

◆ AddInteger() [6/6]

void llvm::FoldingSetNodeID::AddInteger ( unsigned long long  I)
inline

Definition at line 361 of file FoldingSet.h.

References AddInteger(), and I.

◆ AddNodeID()

void FoldingSetNodeID::AddNodeID ( const FoldingSetNodeID ID)

Definition at line 102 of file FoldingSet.cpp.

References llvm::SmallVectorImpl< T >::append().

◆ AddPointer()

void llvm::FoldingSetNodeID::AddPointer ( const void *  Ptr)
inline

Add* - Add various data types to Bit data.

Definition at line 339 of file FoldingSet.h.

References AddInteger(), and Ptr.

◆ AddString()

void FoldingSetNodeID::AddString ( StringRef  String)

◆ clear()

void llvm::FoldingSetNodeID::clear ( )
inline

clear - Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile.

Definition at line 375 of file FoldingSet.h.

Referenced by llvm::FoldingSetBase::FindNodeOrInsertPos().

◆ ComputeHash()

unsigned llvm::FoldingSetNodeID::ComputeHash ( ) const
inline

◆ computeStableHash()

unsigned llvm::FoldingSetNodeID::computeStableHash ( ) const
inline

Definition at line 386 of file FoldingSet.h.

References llvm::FoldingSetNodeIDRef::computeStableHash().

◆ Intern()

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().

◆ operator!=() [1/2]

bool llvm::FoldingSetNodeID::operator!= ( const FoldingSetNodeID RHS) const
inline

Definition at line 394 of file FoldingSet.h.

References RHS.

◆ operator!=() [2/2]

bool llvm::FoldingSetNodeID::operator!= ( const FoldingSetNodeIDRef  RHS) const
inline

Definition at line 395 of file FoldingSet.h.

References RHS.

◆ operator<() [1/2]

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.

◆ operator<() [2/2]

bool FoldingSetNodeID::operator< ( const FoldingSetNodeIDRef  RHS) const

◆ operator==() [1/2]

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.

◆ operator==() [2/2]

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().


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