LLVM  14.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. More...
 
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)
 
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. More...
 
unsigned ComputeHash () const
 ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to lookup the node in the FoldingSetBase. More...
 
bool operator== (const FoldingSetNodeID &RHS) const
 operator== - Used to compare two nodes to each other. More...
 
bool operator== (const FoldingSetNodeIDRef RHS) const
 operator== - Used to compare two nodes to each other. More...
 
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(). More...
 
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. More...
 

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

References llvm::Ref.

Member Function Documentation

◆ Add()

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

Definition at line 337 of file FoldingSet.h.

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

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

◆ AddBoolean()

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

Definition at line 332 of file FoldingSet.h.

References AddInteger(), and B.

◆ AddInteger() [1/6]

void FoldingSetNodeID::AddInteger ( long  I)

Definition at line 67 of file FoldingSet.cpp.

References AddInteger(), and I.

◆ AddInteger() [2/6]

void FoldingSetNodeID::AddInteger ( long long  I)

Definition at line 79 of file FoldingSet.cpp.

References AddInteger(), and I.

◆ AddInteger() [3/6]

void FoldingSetNodeID::AddInteger ( signed  I)

Definition at line 61 of file FoldingSet.cpp.

References I.

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

◆ AddInteger() [4/6]

void FoldingSetNodeID::AddInteger ( unsigned  I)

Definition at line 64 of file FoldingSet.cpp.

References I.

◆ AddInteger() [5/6]

void FoldingSetNodeID::AddInteger ( unsigned long  I)

Definition at line 70 of file FoldingSet.cpp.

References AddInteger(), I, and llvm_unreachable.

◆ AddInteger() [6/6]

void FoldingSetNodeID::AddInteger ( unsigned long long  I)

Definition at line 82 of file FoldingSet.cpp.

References AddInteger(), and I.

◆ AddNodeID()

void FoldingSetNodeID::AddNodeID ( const FoldingSetNodeID ID)

Definition at line 144 of file FoldingSet.cpp.

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

◆ AddPointer()

void FoldingSetNodeID::AddPointer ( const void *  Ptr)

Add* - Add various data types to Bit data.

Definition at line 52 of file FoldingSet.cpp.

References AddInteger().

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

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

◆ ComputeHash()

unsigned FoldingSetNodeID::ComputeHash ( ) const

ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to lookup the node in the FoldingSetBase.

Definition at line 150 of file FoldingSet.cpp.

References llvm::FoldingSetNodeIDRef::ComputeHash().

Referenced by llvm::DefaultFoldingSetTrait< SCEVPredicate >::ComputeHash(), and llvm::DefaultContextualFoldingSetTrait< T, Ctx >::ComputeHash().

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

References Allocator.

◆ operator!=() [1/2]

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

Definition at line 351 of file FoldingSet.h.

◆ operator!=() [2/2]

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

Definition at line 352 of file FoldingSet.h.

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

◆ operator<() [2/2]

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

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

◆ operator==() [2/2]

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

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

Definition at line 162 of file FoldingSet.cpp.


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