LLVM
8.0.1
|
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... | |
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 306 of file FoldingSet.h.
|
default |
|
inline |
Definition at line 314 of file FoldingSet.h.
References I.
Definition at line 330 of file FoldingSet.h.
References llvm::DefaultFoldingSetTrait< T >::Profile().
Referenced by llvm::ImmutableListImpl< T >::Profile(), llvm::FoldingSetTrait< std::pair< T1, T2 > >::Profile(), and llvm::APFloat::Profile().
|
inline |
Definition at line 325 of file FoldingSet.h.
References llvm::String.
Referenced by AddNodeIDCustom(), llvm::SelectionDAG::getConstant(), and llvm::ImutProfileInfo< bool >::Profile().
void FoldingSetNodeID::AddInteger | ( | signed | I | ) |
Definition at line 61 of file FoldingSet.cpp.
References llvm::tgtok::Bits.
Referenced by AddNodeIDCustom(), llvm::GISelInstProfileBuilder::addNodeIDFlag(), llvm::GISelInstProfileBuilder::addNodeIDImmediate(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::GISelInstProfileBuilder::addNodeIDOpcode(), AddNodeIDOpcode(), AddNodeIDOperands(), llvm::GISelInstProfileBuilder::addNodeIDRegNum(), llvm::GISelInstProfileBuilder::addNodeIDRegType(), llvm::SystemZConstantPoolValue::addSelectionDAGCSEId(), llvm::ARMConstantPoolValue::addSelectionDAGCSEId(), llvm::Attribute::get(), llvm::ScalarEvolution::getAddExpr(), llvm::SelectionDAG::getAddrSpaceCast(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getBlockAddress(), llvm::ScalarEvolution::getConstant(), llvm::SelectionDAG::getConstantPool(), llvm::ScalarEvolution::getEqualPredicate(), 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::MachineMemOperand::Profile(), llvm::APSInt::Profile(), llvm::APInt::Profile(), llvm::ImutProfileInteger< T >::Profile(), ProfileBinOpInit(), ProfileBitsInit(), ProfileListInit(), ProfileRecordRecTy(), ProfileTernOpInit(), ProfileUnOpInit(), and ProfileVarDefInit().
void FoldingSetNodeID::AddInteger | ( | unsigned | I | ) |
Definition at line 64 of file FoldingSet.cpp.
References llvm::tgtok::Bits.
void FoldingSetNodeID::AddInteger | ( | long | I | ) |
Definition at line 67 of file FoldingSet.cpp.
void FoldingSetNodeID::AddInteger | ( | unsigned long | I | ) |
Definition at line 70 of file FoldingSet.cpp.
References llvm_unreachable.
void FoldingSetNodeID::AddInteger | ( | long long | I | ) |
Definition at line 79 of file FoldingSet.cpp.
void FoldingSetNodeID::AddInteger | ( | unsigned long long | I | ) |
Definition at line 82 of file FoldingSet.cpp.
void FoldingSetNodeID::AddNodeID | ( | const FoldingSetNodeID & | ID | ) |
Definition at line 140 of file FoldingSet.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::tgtok::Bits, and llvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced by llvm::FastFoldingSetNode::Profile().
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(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::GISelInstProfileBuilder::addNodeIDMBB(), AddNodeIDOperands(), llvm::GISelInstProfileBuilder::addNodeIDRegType(), AddNodeIDValueTypes(), llvm::SystemZConstantPoolValue::addSelectionDAGCSEId(), llvm::ARMConstantPoolConstant::addSelectionDAGCSEId(), llvm::ARMConstantPoolMBB::addSelectionDAGCSEId(), llvm::ScalarEvolution::getAddExpr(), llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getBlockAddress(), llvm::ScalarEvolution::getConstant(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getConstantPool(), llvm::ScalarEvolution::getEqualPredicate(), 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::MachineMemOperand::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(), ProfileIsAOpInit(), ProfileListInit(), ProfileRecordRecTy(), ProfileTernOpInit(), ProfileUnOpInit(), and ProfileVarDefInit().
void FoldingSetNodeID::AddString | ( | StringRef | String | ) |
Definition at line 87 of file FoldingSet.cpp.
References llvm::tgtok::Bits, llvm::StringRef::data(), llvm::sys::IsBigEndianHost, llvm::sys::IsLittleEndianHost, LLVM_FALLTHROUGH, and llvm::StringRef::size().
Referenced by llvm::ARMConstantPoolSymbol::addSelectionDAGCSEId(), llvm::Attribute::get(), and llvm::AttributeImpl::Profile().
|
inline |
clear - Clear the accumulated profile, allowing this FoldingSetNodeID object to be used to compute a new profile.
Definition at line 334 of file FoldingSet.h.
References llvm::SmallVectorImpl< T >::clear(), llvm::IndexedInstrProf::ComputeHash(), and llvm::operator==().
Referenced by llvm::FoldingSetBase::clear(), and llvm::FoldingSetBase::FindNodeOrInsertPos().
unsigned FoldingSetNodeID::ComputeHash | ( | ) | const |
ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to lookup the node in the FoldingSetBase.
Definition at line 146 of file FoldingSet.cpp.
References llvm::tgtok::Bits, llvm::FoldingSetNodeIDRef::ComputeHash(), and llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef().
Referenced by llvm::DefaultFoldingSetTrait< SCEVPredicate >::ComputeHash(), llvm::DefaultContextualFoldingSetTrait< T, Ctx >::ComputeHash(), llvm::FoldingSetBase::FindNodeOrInsertPos(), node_hash(), and llvm::ImutAVLTree< ImutInfo >::validateTree().
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 176 of file FoldingSet.cpp.
References llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Allocate(), llvm::tgtok::Bits, and llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef().
Referenced by llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getConstant(), llvm::ScalarEvolution::getEqualPredicate(), llvm::ScalarEvolution::getSignExtendExpr(), llvm::ScalarEvolution::getTruncateExpr(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUnknown(), llvm::SelectionDAG::getVTList(), llvm::ScalarEvolution::getWrapPredicate(), and llvm::ScalarEvolution::getZeroExtendExpr().
|
inline |
Definition at line 344 of file FoldingSet.h.
|
inline |
Definition at line 345 of file FoldingSet.h.
References Allocator, and llvm::operator<().
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::SmallVectorBase::size().
bool FoldingSetNodeID::operator< | ( | const FoldingSetNodeIDRef | RHS | ) | const |
Definition at line 168 of file FoldingSet.cpp.
References llvm::tgtok::Bits, and llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef().
bool FoldingSetNodeID::operator== | ( | const FoldingSetNodeID & | RHS | ) | const |
operator== - Used to compare two nodes to each other.
Definition at line 152 of file FoldingSet.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::FoldingSetNodeIDRef::FoldingSetNodeIDRef(), and llvm::SmallVectorBase::size().
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().