LLVM 24.0.0git
llvm::FoldingSetNodeID Class Reference

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)
LLVM_ABI void AddString (StringRef String)
LLVM_ABI void AddNodeID (const FoldingSetNodeID &ID)
template<typename T>
void Add (const T &x)
void clear ()
 Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile.
unsigned ComputeHash () const
unsigned computeStableHash () const
LLVM_ABI bool operator== (const FoldingSetNodeID &RHS) const
 operator== - Used to compare two nodes to each other.
LLVM_ABI bool operator== (const FoldingSetNodeIDRef RHS) const
bool operator!= (const FoldingSetNodeID &RHS) const
bool operator!= (const FoldingSetNodeIDRef RHS) const
LLVM_ABI 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().
LLVM_ABI bool operator< (const FoldingSetNodeIDRef RHS) const
LLVM_ABI FoldingSetNodeIDRef Intern (BumpPtrAllocator &Allocator) const
 Copy this node's data to a memory region allocated from the given allocator and return a FoldingSetNodeIDRef describing the interned data.

Detailed Description

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

References getSize(), and llvm::Ref.

Member Function Documentation

◆ Add()

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

Definition at line 251 of file FoldingSet.h.

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

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

◆ AddBoolean()

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

Definition at line 247 of file FoldingSet.h.

References AddInteger(), and B().

◆ AddInteger() [1/6]

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

Definition at line 243 of file FoldingSet.h.

References I.

◆ AddInteger() [2/6]

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

Definition at line 245 of file FoldingSet.h.

References I.

◆ AddInteger() [3/6]

◆ AddInteger() [4/6]

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

Definition at line 242 of file FoldingSet.h.

References I.

◆ AddInteger() [5/6]

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

Definition at line 244 of file FoldingSet.h.

References I.

◆ AddInteger() [6/6]

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

Definition at line 246 of file FoldingSet.h.

References I.

◆ AddNodeID()

void FoldingSetNodeID::AddNodeID ( const FoldingSetNodeID & ID)

Definition at line 106 of file FoldingSet.cpp.

References FoldingSetNodeID().

◆ AddPointer()

◆ AddString()

void FoldingSetNodeID::AddString ( StringRef String)

◆ clear()

void llvm::FoldingSetNodeID::clear ( )
inline

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

Definition at line 257 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 268 of file FoldingSet.h.

References llvm::FoldingSetNodeIDRef::computeStableHash().

◆ Intern()

FoldingSetNodeIDRef FoldingSetNodeID::Intern ( BumpPtrAllocator & Allocator) const

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 127 of file FoldingSet.cpp.

References llvm::uninitialized_copy().

◆ operator!=() [1/2]

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

Definition at line 276 of file FoldingSet.h.

References FoldingSetNodeID(), and RHS.

◆ operator!=() [2/2]

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

Definition at line 277 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 118 of file FoldingSet.cpp.

References FoldingSetNodeID().

◆ operator<() [2/2]

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

Definition at line 122 of file FoldingSet.cpp.

◆ operator==() [1/2]

bool FoldingSetNodeID::operator== ( const FoldingSetNodeID & RHS) const

operator== - Used to compare two nodes to each other.

Definition at line 110 of file FoldingSet.cpp.

References FoldingSetNodeID().

◆ operator==() [2/2]

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

Definition at line 114 of file FoldingSet.cpp.


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