LLVM
8.0.1
|
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
#include <cstring>
Go to the source code of this file.
Functions | |
static FoldingSetBase::Node * | GetNextPtr (void *NextInBucketPtr) |
Helper functions for FoldingSetBase. More... | |
static void ** | GetBucketPtr (void *NextInBucketPtr) |
testing. More... | |
static void ** | GetBucketFor (unsigned Hash, void **Buckets, unsigned NumBuckets) |
GetBucketFor - Hash the specified node ID and return the hash bucket for the specified ID. More... | |
static void ** | AllocateBuckets (unsigned NumBuckets) |
AllocateBuckets - Allocated initialized bucket memory. More... | |
|
static |
AllocateBuckets - Allocated initialized bucket memory.
Definition at line 216 of file FoldingSet.cpp.
References llvm::safe_calloc().
Referenced by llvm::FoldingSetBase::clear(), and llvm::FoldingSetBase::FoldingSetBase().
GetBucketFor - Hash the specified node ID and return the hash bucket for the specified ID.
Definition at line 209 of file FoldingSet.cpp.
Referenced by llvm::FoldingSetBase::clear(), llvm::FoldingSetBase::FindNodeOrInsertPos(), and llvm::FoldingSetBase::InsertNode().
|
static |
testing.
Definition at line 201 of file FoldingSet.cpp.
References assert().
Referenced by llvm::FoldingSetIteratorImpl::advance(), and llvm::FoldingSetBase::RemoveNode().
|
static |
Helper functions for FoldingSetBase.
GetNextPtr - In order to save space, each bucket is a singly-linked-list. In order to make deletion more efficient, we make the list circular, so we can delete a node without computing its hash. The problem with this is that the start of the hash buckets are not Nodes. If NextInBucketPtr is a bucket pointer, this method returns null: use GetBucketPtr when this happens.
Definition at line 191 of file FoldingSet.cpp.
Referenced by llvm::FoldingSetIteratorImpl::advance(), llvm::FoldingSetBase::clear(), llvm::FoldingSetBase::FindNodeOrInsertPos(), llvm::FoldingSetBucketIteratorImpl::FoldingSetBucketIteratorImpl(), llvm::FoldingSetIteratorImpl::FoldingSetIteratorImpl(), and llvm::FoldingSetBase::RemoveNode().