LLVM 24.0.0git
llvm::ubi Namespace Reference

Classes

class  AnyValue
class  AnyValuePrinter
struct  Byte
 Representation of a byte in memory. More...
class  BytesView
 Endianness aware accessor for bytes. More...
class  ByteValue
 Represents a scalar byte value. More...
class  Context
 The global context for the interpreter. More...
class  DiagnosticReporter
class  EventHandler
 An interface for handling events and managing outputs during interpretation. More...
class  ExecutorBase
struct  Frame
 Context for a function call. More...
class  InstExecutor
 Instruction executor using the visitor pattern. More...
class  Library
class  MaterializedConstant
class  MemoryObject
class  Pointer
struct  ProgramExitInfo
class  Provenance
 Components of a pointer excluding address. More...
class  WildcardProvenance
 A set of previously exposed provenances. More...

Typedefs

using ConstBytesView = BytesView<ArrayRef<Byte>>
using MutableBytesView = BytesView<MutableArrayRef<Byte>>

Enumerations

enum class  MemInitKind { Zeroed , Uninitialized , Poisoned }
enum class  MemAllocKind {
  Global , BlockAddress , Stack , Malloc ,
  New , NewArray
}
enum class  MemoryObjectState { Alive , Dead , Freed }
enum class  UndefValueBehavior { NonDeterministic , Zero }
enum class  NaNPropagationBehavior {
  NonDeterministic , PreferredNaN , QuietingNaN , UnchangedNaN ,
  TargetSpecificNaN
}
enum class  StorageKind {
  Integer , Float , Pointer , Byte ,
  Poison , None , Aggregate
}
enum class  BooleanKind { False , True , Poison }
 Tri-state boolean value. More...
enum class  FrameState { Entry , Running , Pending , Exit }
enum class  DiagnosticKind { ImmediateUB , Error }

Functions

raw_ostream & operator<< (raw_ostream &OS, const Pointer &P)
AnyValue addNoWrap (const APInt &LHS, const APInt &RHS, bool HasNSW, bool HasNUW)
AnyValue subNoWrap (const APInt &LHS, const APInt &RHS, bool HasNSW, bool HasNUW)
AnyValue mulNoWrap (const APInt &LHS, const APInt &RHS, bool HasNSW, bool HasNUW)
static void forEachScalarValue (AnyValue &V, function_ref< void(AnyValue &)> Visit)
 Visit the scalar values recursively.
static void applyRangeAttr (AnyValue &V, const ConstantRange &CR)
static void applyNoFPClassAttr (AnyValue &V, FPClassTest NoFPClass)
static void applyNonNullAttr (AnyValue &V, unsigned AS, const DataLayout &DL)
static void applyAlignAttr (AnyValue &V, Align Alignment)
static bool violatesNoUndefAttr (const AnyValue &V)
static bool violatesDereferenceableBytesAttr (const AnyValue &V, uint64_t Bytes, bool OrNull, unsigned AS, Context &Ctx)
 Assumes V is either a poison or a pointer.
static uint64_t getMaxAlign (const DataLayout &DL, unsigned AS)

Typedef Documentation

◆ ConstBytesView

Definition at line 210 of file Context.h.

◆ MutableBytesView

Definition at line 211 of file Context.h.

Enumeration Type Documentation

◆ BooleanKind

enum class llvm::ubi::BooleanKind
strong

Tri-state boolean value.

Enumerator
False 
True 
Poison 

Definition at line 142 of file Value.h.

◆ DiagnosticKind

enum class llvm::ubi::DiagnosticKind
strong
Enumerator
ImmediateUB 
Error 

Definition at line 79 of file ExecutorBase.h.

◆ FrameState

enum class llvm::ubi::FrameState
strong
Enumerator
Entry 
Running 
Pending 
Exit 

Definition at line 26 of file ExecutorBase.h.

◆ MemAllocKind

enum class llvm::ubi::MemAllocKind
strong
Enumerator
Global 
BlockAddress 
Stack 
Malloc 
New 
NewArray 

Definition at line 32 of file Context.h.

◆ MemInitKind

enum class llvm::ubi::MemInitKind
strong
Enumerator
Zeroed 
Uninitialized 
Poisoned 

Definition at line 26 of file Context.h.

◆ MemoryObjectState

enum class llvm::ubi::MemoryObjectState
strong
Enumerator
Alive 
Dead 
Freed 

Definition at line 41 of file Context.h.

◆ NaNPropagationBehavior

Enumerator
NonDeterministic 
PreferredNaN 
QuietingNaN 
UnchangedNaN 
TargetSpecificNaN 

Definition at line 65 of file Context.h.

◆ StorageKind

enum class llvm::ubi::StorageKind
strong
Enumerator
Integer 
Float 
Pointer 
Byte 
Poison 
None 
Aggregate 

Definition at line 131 of file Value.h.

◆ UndefValueBehavior

enum class llvm::ubi::UndefValueBehavior
strong
Enumerator
NonDeterministic 
Zero 

Definition at line 60 of file Context.h.

Function Documentation

◆ addNoWrap()

AnyValue llvm::ubi::addNoWrap ( const APInt & LHS,
const APInt & RHS,
bool HasNSW,
bool HasNUW )
inline

◆ applyAlignAttr()

void llvm::ubi::applyAlignAttr ( AnyValue & V,
Align Alignment )
static

◆ applyNoFPClassAttr()

void llvm::ubi::applyNoFPClassAttr ( AnyValue & V,
FPClassTest NoFPClass )
static

◆ applyNonNullAttr()

void llvm::ubi::applyNonNullAttr ( AnyValue & V,
unsigned AS,
const DataLayout & DL )
static

◆ applyRangeAttr()

◆ forEachScalarValue()

void llvm::ubi::forEachScalarValue ( AnyValue & V,
function_ref< void(AnyValue &)> Visit )
static

Visit the scalar values recursively.

The callback function may modify the value in-place.

Definition at line 38 of file Interpreter.cpp.

References forEachScalarValue(), and V.

Referenced by applyAlignAttr(), applyNoFPClassAttr(), applyRangeAttr(), forEachScalarValue(), llvm::ubi::InstExecutor::handleMetadata(), and violatesNoUndefAttr().

◆ getMaxAlign()

uint64_t llvm::ubi::getMaxAlign ( const DataLayout & DL,
unsigned AS )
static

Definition at line 22 of file Library.cpp.

References DL, and uint64_t.

◆ mulNoWrap()

AnyValue llvm::ubi::mulNoWrap ( const APInt & LHS,
const APInt & RHS,
bool HasNSW,
bool HasNUW )
inline

◆ operator<<()

raw_ostream & llvm::ubi::operator<< ( raw_ostream & OS,
const Pointer & P )
inline

Definition at line 471 of file Value.h.

References P.

◆ subNoWrap()

AnyValue llvm::ubi::subNoWrap ( const APInt & LHS,
const APInt & RHS,
bool HasNSW,
bool HasNUW )
inline

◆ violatesDereferenceableBytesAttr()

bool llvm::ubi::violatesDereferenceableBytesAttr ( const AnyValue & V,
uint64_t Bytes,
bool OrNull,
unsigned AS,
Context & Ctx )
static

◆ violatesNoUndefAttr()