LLVM  6.0.0svn
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 311 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 319 of file FoldingSet.h.

References I.

Member Function Documentation

◆ Add()

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

◆ AddBoolean()

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

◆ AddInteger() [1/6]

void FoldingSetNodeID::AddInteger ( signed  I)

Definition at line 61 of file FoldingSet.cpp.

References llvm::tgtok::Bits.

Referenced by AddNodeIDCustom(), AddNodeIDOpcode(), AddNodeIDOperands(), llvm::SystemZConstantPoolValue::addSelectionDAGCSEId(), llvm::ARMConstantPoolValue::addSelectionDAGCSEId(), llvm::Attribute::get(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAddRecExpr(), llvm::SelectionDAG::getAddrSpaceCast(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getBlockAddress(), llvm::ScalarEvolution::getConstant(), llvm::SelectionDAG::getConstantPool(), llvm::ScalarEvolution::getEqualPredicate(), getExtendAddRecStart(), llvm::SelectionDAG::getFrameIndex(), llvm::SelectionDAG::getGlobalAddress(), llvm::SelectionDAG::getIndexedStore(), llvm::SelectionDAG::getJumpTable(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getRegister(), llvm::ScalarEvolution::getSignExtendExpr(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetIndex(), llvm::SelectionDAG::getTargetMemSDNode(), llvm::ScalarEvolution::getTruncateExpr(), llvm::SelectionDAG::getTruncStore(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUnknown(), llvm::SelectionDAG::getVectorShuffle(), llvm::SelectionDAG::getVTList(), llvm::ScalarEvolution::getWrapPredicate(), llvm::ScalarEvolution::getZeroExtendExpr(), llvm::DIEAbbrevData::Profile(), llvm::AttributeImpl::Profile(), llvm::DIEAbbrev::Profile(), llvm::APSInt::Profile(), llvm::APInt::Profile(), llvm::ImutProfileInteger< T >::Profile(), ProfileBinOpInit(), ProfileBitsInit(), ProfileListInit(), ProfileTernOpInit(), and ProfileUnOpInit().

◆ AddInteger() [2/6]

void FoldingSetNodeID::AddInteger ( unsigned  I)

Definition at line 64 of file FoldingSet.cpp.

References llvm::tgtok::Bits.

◆ AddInteger() [3/6]

void FoldingSetNodeID::AddInteger ( long  I)

Definition at line 67 of file FoldingSet.cpp.

◆ AddInteger() [4/6]

void FoldingSetNodeID::AddInteger ( unsigned long  I)

Definition at line 70 of file FoldingSet.cpp.

References llvm_unreachable.

◆ AddInteger() [5/6]

void FoldingSetNodeID::AddInteger ( long long  I)

Definition at line 79 of file FoldingSet.cpp.

◆ AddInteger() [6/6]

void FoldingSetNodeID::AddInteger ( unsigned long long  I)

Definition at line 82 of file FoldingSet.cpp.

◆ AddNodeID()

void FoldingSetNodeID::AddNodeID ( const FoldingSetNodeID ID)

◆ AddPointer()

void FoldingSetNodeID::AddPointer ( const void *  Ptr)

Add* - Add various data types to Bit data.

Definition at line 52 of file FoldingSet.cpp.

Referenced by AddNodeIDCustom(), AddNodeIDOperands(), AddNodeIDValueTypes(), llvm::SystemZConstantPoolValue::addSelectionDAGCSEId(), llvm::ARMConstantPoolConstant::addSelectionDAGCSEId(), llvm::ARMConstantPoolMBB::addSelectionDAGCSEId(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAddRecExpr(), llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getBlockAddress(), llvm::ScalarEvolution::getConstant(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getConstantPool(), llvm::ScalarEvolution::getEqualPredicate(), getExtendAddRecStart(), llvm::SelectionDAG::getGlobalAddress(), llvm::SelectionDAG::getLabelNode(), llvm::SelectionDAG::getMDNode(), llvm::SelectionDAG::getRegisterMask(), llvm::ScalarEvolution::getSignExtendExpr(), llvm::SelectionDAG::getSrcValue(), llvm::SelectionDAG::getTargetMemSDNode(), llvm::ScalarEvolution::getTruncateExpr(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUnknown(), llvm::ScalarEvolution::getWrapPredicate(), llvm::ScalarEvolution::getZeroExtendExpr(), node_hash(), llvm::ImmutableListImpl< T >::Profile(), llvm::ImmutableList< T >::Profile(), llvm::Attribute::Profile(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::Profile(), llvm::AttributeListImpl::Profile(), llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::Profile(), llvm::FoldingSetTrait< T * >::Profile(), llvm::ImutProfileInfo< T * >::Profile(), llvm::ImmutableSet< ValT, ValInfo >::Profile(), llvm::ImmutableSetRef< ValT, ValInfo >::Profile(), ProfileBinOpInit(), ProfileBitsInit(), ProfileDagInit(), ProfileListInit(), ProfileTernOpInit(), and ProfileUnOpInit().

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

References llvm::SmallVectorImpl< T >::clear(), llvm::IndexedInstrProf::ComputeHash(), and llvm::operator==().

Referenced by llvm::FoldingSetBase::clear(), and llvm::FoldingSetBase::FindNodeOrInsertPos().

◆ ComputeHash()

unsigned FoldingSetNodeID::ComputeHash ( ) const

◆ Intern()

FoldingSetNodeIDRef FoldingSetNodeID::Intern ( BumpPtrAllocator Allocator) const

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

References Allocator, and llvm::operator<().

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

References llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef(), and llvm::SmallVectorTemplateCommon< T, typename >::size().

◆ operator<() [2/2]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

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

Definition at line 158 of file FoldingSet.cpp.

References llvm::tgtok::Bits, and llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef().


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