LLVM API Documentation
#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 FoldingSetImpl::Node * | GetNextPtr (void *NextInBucketPtr) |
Helper functions for FoldingSetImpl. | |
static void ** | GetBucketPtr (void *NextInBucketPtr) |
testing. | |
static void ** | GetBucketFor (unsigned Hash, void **Buckets, unsigned NumBuckets) |
static void ** | AllocateBuckets (unsigned NumBuckets) |
AllocateBuckets - Allocated initialized bucket memory. |
static void** AllocateBuckets | ( | unsigned | NumBuckets | ) | [static] |
AllocateBuckets - Allocated initialized bucket memory.
Definition at line 215 of file FoldingSet.cpp.
References llvm::LibFunc::calloc.
Referenced by llvm::FoldingSetImpl::FoldingSetImpl().
static void** GetBucketFor | ( | unsigned | Hash, |
void ** | Buckets, | ||
unsigned | NumBuckets | ||
) | [static] |
GetBucketFor - Hash the specified node ID and return the hash bucket for the specified ID.
Definition at line 208 of file FoldingSet.cpp.
Referenced by llvm::FoldingSetImpl::FindNodeOrInsertPos(), and llvm::FoldingSetImpl::InsertNode().
static void** GetBucketPtr | ( | void * | NextInBucketPtr | ) | [static] |
testing.
Definition at line 200 of file FoldingSet.cpp.
Referenced by llvm::FoldingSetIteratorImpl::advance(), and llvm::FoldingSetImpl::RemoveNode().
static FoldingSetImpl::Node* GetNextPtr | ( | void * | NextInBucketPtr | ) | [static] |
Helper functions for FoldingSetImpl.
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 190 of file FoldingSet.cpp.
Referenced by llvm::FoldingSetIteratorImpl::advance(), llvm::FoldingSetImpl::FindNodeOrInsertPos(), llvm::FoldingSetBucketIteratorImpl::FoldingSetBucketIteratorImpl(), llvm::FoldingSetIteratorImpl::FoldingSetIteratorImpl(), and llvm::FoldingSetImpl::RemoveNode().