LLVM  15.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)
 Add* - Add various data types to Bit data. More...
 
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 317 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 325 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 361 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 356 of file FoldingSet.h.

References AddInteger(), and B.

◆ AddInteger() [1/6]

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

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

References AddInteger(), and I.

Referenced by AddInteger().

◆ AddInteger() [3/6]

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

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

References I.

◆ AddInteger() [5/6]

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

Definition at line 341 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 351 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 329 of file FoldingSet.h.

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

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

◆ ComputeHash()

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

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

Definition at line 369 of file FoldingSet.h.

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

References Allocator.

◆ operator!=() [1/2]

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

Definition at line 377 of file FoldingSet.h.

References RHS.

◆ operator!=() [2/2]

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

Definition at line 378 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

Definition at line 124 of file FoldingSet.cpp.

References RHS.

◆ 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 RHS.


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