LLVM 24.0.0git
llvm::ubi::AnyValue Class Reference

#include "llvm/UBAwareInterpreter/Value.h"

Inheritance diagram for llvm::ubi::AnyValue:
[legend]

Public Member Functions

 AnyValue ()
 AnyValue (PoisonTag)
 AnyValue (APInt Val)
 AnyValue (APFloat Val)
 AnyValue (Pointer Val)
 AnyValue (ByteValue Val)
 AnyValue (std::vector< AnyValue > Val)
LLVM_ABI AnyValue (const AnyValue &Other)
LLVM_ABI AnyValue (AnyValue &&Other)
LLVM_ABI AnyValue & operator= (const AnyValue &)
LLVM_ABI AnyValue & operator= (AnyValue &&)
 ~AnyValue ()
LLVM_ABI void print (Context &Ctx, raw_ostream &OS) const
bool isNone () const
bool isPoison () const
bool isInteger () const
bool isFloat () const
bool isPointer () const
bool isByte () const
bool isAggregate () const
bool isCompatibleWith (Type *Ty) const
const APInt & asInteger () const
const APFloat & asFloat () const
const Pointer & asPointer () const
const ByteValue & asByte () const
ByteValue & asMutableByte ()
const std::vector< AnyValue > & asAggregate () const
std::vector< AnyValue > & asAggregate ()
template<size_t I>
const AnyValue & get () const
BooleanKind asBoolean () const

Static Public Member Functions

static AnyValue poison ()
 Use getPoisonValue unless you know the scalar type is integer/fp/ptr!
static AnyValue boolean (bool Val)
static LLVM_ABI AnyValue getPoisonValue (Context &Ctx, Type *Ty)
static LLVM_ABI AnyValue getNullValue (Context &Ctx, Type *Ty)
static LLVM_ABI AnyValue getVectorSplat (const AnyValue &Scalar, size_t NumElements)

Detailed Description

Definition at line 335 of file Value.h.

Constructor & Destructor Documentation

◆ AnyValue() [1/9]

◆ AnyValue() [2/9]

llvm::ubi::AnyValue::AnyValue ( PoisonTag )
inlineexplicit

Definition at line 350 of file Value.h.

References llvm::ubi::Poison.

◆ AnyValue() [3/9]

llvm::ubi::AnyValue::AnyValue ( APInt Val)
inline

Definition at line 351 of file Value.h.

References llvm::ubi::Integer, IntVal, and llvm::move().

◆ AnyValue() [4/9]

llvm::ubi::AnyValue::AnyValue ( APFloat Val)
inline

Definition at line 352 of file Value.h.

References llvm::ubi::Float, FloatVal, and llvm::move().

◆ AnyValue() [5/9]

llvm::ubi::AnyValue::AnyValue ( Pointer Val)
inline

Definition at line 353 of file Value.h.

References llvm::move(), and PtrVal.

◆ AnyValue() [6/9]

llvm::ubi::AnyValue::AnyValue ( ByteValue Val)
inline

Definition at line 354 of file Value.h.

References ByteVal, and llvm::move().

◆ AnyValue() [7/9]

llvm::ubi::AnyValue::AnyValue ( std::vector< AnyValue > Val)
inline

Definition at line 355 of file Value.h.

References llvm::ubi::Aggregate, AggVal, and llvm::move().

◆ AnyValue() [8/9]

llvm::ubi::AnyValue::AnyValue ( const AnyValue & Other)

Definition at line 167 of file Value.cpp.

References AnyValue(), and llvm::Other.

◆ AnyValue() [9/9]

llvm::ubi::AnyValue::AnyValue ( AnyValue && Other)

Definition at line 189 of file Value.cpp.

References AnyValue(), and llvm::Other.

◆ ~AnyValue()

llvm::ubi::AnyValue::~AnyValue ( )
inline

Definition at line 361 of file Value.h.

Member Function Documentation

◆ asAggregate() [1/2]

std::vector< AnyValue > & llvm::ubi::AnyValue::asAggregate ( )
inline

Definition at line 433 of file Value.h.

References llvm::ubi::Aggregate, AggVal, and assert().

◆ asAggregate() [2/2]

◆ asBoolean()

BooleanKind llvm::ubi::AnyValue::asBoolean ( ) const
inline

◆ asByte()

const ByteValue & llvm::ubi::AnyValue::asByte ( ) const
inline

Definition at line 417 of file Value.h.

References assert(), llvm::ubi::Byte, and ByteVal.

Referenced by llvm::ubi::Context::toBytes().

◆ asFloat()

const APFloat & llvm::ubi::AnyValue::asFloat ( ) const
inline

◆ asInteger()

◆ asMutableByte()

ByteValue & llvm::ubi::AnyValue::asMutableByte ( )
inline

Definition at line 422 of file Value.h.

References assert(), llvm::ubi::Byte, and ByteVal.

Referenced by llvm::ubi::Context::freeze().

◆ asPointer()

◆ boolean()

AnyValue llvm::ubi::AnyValue::boolean ( bool Val)
inlinestatic

◆ get()

template<size_t I>
const AnyValue & llvm::ubi::AnyValue::get ( ) const
inline

Definition at line 440 of file Value.h.

References llvm::ubi::Aggregate, AggVal, AnyValue(), assert(), and I.

◆ getNullValue()

AnyValue llvm::ubi::AnyValue::getNullValue ( Context & Ctx,
Type * Ty )
static

◆ getPoisonValue()

◆ getVectorSplat()

AnyValue llvm::ubi::AnyValue::getVectorSplat ( const AnyValue & Scalar,
size_t NumElements )
static

Definition at line 325 of file Value.cpp.

References AnyValue(), and assert().

Referenced by llvm::ubi::Context::computeGEP().

◆ isAggregate()

bool llvm::ubi::AnyValue::isAggregate ( ) const
inline

◆ isByte()

bool llvm::ubi::AnyValue::isByte ( ) const
inline

Definition at line 378 of file Value.h.

References llvm::ubi::Byte.

Referenced by llvm::ubi::Context::freeze().

◆ isCompatibleWith()

bool llvm::ubi::AnyValue::isCompatibleWith ( Type * Ty) const
inline

◆ isFloat()

bool llvm::ubi::AnyValue::isFloat ( ) const
inline

Definition at line 376 of file Value.h.

References llvm::ubi::Float.

◆ isInteger()

bool llvm::ubi::AnyValue::isInteger ( ) const
inline

Definition at line 375 of file Value.h.

References llvm::ubi::Integer.

◆ isNone()

bool llvm::ubi::AnyValue::isNone ( ) const
inline

◆ isPointer()

bool llvm::ubi::AnyValue::isPointer ( ) const
inline

Definition at line 377 of file Value.h.

References llvm::ubi::Pointer.

Referenced by llvm::ubi::Context::computeScaledPtrAdd(), and llvm::ubi::ByteValue::print().

◆ isPoison()

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ poison()

◆ print()

Member Data Documentation

◆ AggVal

std::vector<AnyValue> llvm::ubi::AnyValue::AggVal

Definition at line 342 of file Value.h.

Referenced by AnyValue(), asAggregate(), asAggregate(), get(), operator=(), operator=(), and print().

◆ ByteVal

ByteValue llvm::ubi::AnyValue::ByteVal

Definition at line 341 of file Value.h.

Referenced by AnyValue(), asByte(), asMutableByte(), operator=(), operator=(), and print().

◆ FloatVal

APFloat llvm::ubi::AnyValue::FloatVal

Definition at line 339 of file Value.h.

Referenced by AnyValue(), asFloat(), operator=(), operator=(), and print().

◆ IntVal

APInt llvm::ubi::AnyValue::IntVal

Definition at line 338 of file Value.h.

Referenced by AnyValue(), asInteger(), operator=(), operator=(), and print().

◆ PtrVal

Pointer llvm::ubi::AnyValue::PtrVal

Definition at line 340 of file Value.h.

Referenced by AnyValue(), asPointer(), operator=(), operator=(), and print().


The documentation for this class was generated from the following files: