|
LLVM 24.0.0git
|
#include "llvm/Support/AllocToken.h"#include "llvm/ADT/StringSwitch.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/SipHash.h"Go to the source code of this file.
Functions | |
| static uint64_t | getStableHash (const AllocTokenMetadata &Metadata, uint64_t MaxTokens) |
| static uint64_t | getTypeFuncHash (const AllocTokenMetadata &Metadata, uint64_t MaxTokens, bool PointerSplit) |
| Splits the Bits bits into: [pointer flag,] type name hash, function name hash. | |
|
static |
Definition at line 53 of file AllocToken.cpp.
References llvm::getStableSipHash(), and uint64_t.
Referenced by llvm::getAllocToken().
|
static |
Splits the Bits bits into: [pointer flag,] type name hash, function name hash.
The function name hash gets Bits / 2 bits. Bits is k if MaxTokens is 2^k-1 (e.g. SIZE_MAX, tokens in [0, MaxTokens]), or Log2(MaxTokens) otherwise. With pointer split, the MSB is the pointer flag.
Definition at line 62 of file AllocToken.cpp.
References llvm::countr_one(), llvm::getStableSipHash(), llvm::isMask_64(), llvm::Log2_64(), llvm::maskTrailingOnes(), and uint64_t.
Referenced by llvm::getAllocToken().