llvm::AllocTokenMode

Modes for generating allocation token IDs.

Synopsis

Declared in <llvm/Support/AllocToken.h>

enum class AllocTokenMode : int;

Members

NameDescription
Increment Incrementally increasing token ID.
Random Simple mode that returns a statically-assigned random token ID.
TypeHash Token ID based on allocated type hash.
TypeHashPointerSplit Token ID based on allocated type hash, where the top half ID-space is reserved for types that contain pointers and the bottom half for types that do not contain pointers.

Non-Member Functions

NameDescription
getAllocTokenCalculates stable allocation token ID. Returns std::nullopt for stateful modes that are only available in the AllocToken pass.
getAllocTokenModeAsStringReturns the canonical string name for the given AllocTokenMode.
getAllocTokenModeFromStringReturns the AllocTokenMode from its canonical string name; if an invalid name was provided returns nullopt.