|
LLVM 24.0.0git
|
Represents a scalar byte value. More...
#include "llvm/UBAwareInterpreter/Value.h"
Public Types | |
| enum class | CanonicalizeMode { Canonical , PaddingFromValue , FlushNonCanonicalToPoison } |
| Specify how to treat the input. More... | |
Public Member Functions | |
| LLVM_ABI | ByteValue (const APInt &V, bool IsLittleEndian) |
| ByteValue (uint32_t BitWidth, ArrayRef< Byte > Val, bool IsLittleEndian, CanonicalizeMode Mode=CanonicalizeMode::Canonical) | |
| ByteValue (uint32_t BitWidth, std::vector< Byte > Val, bool IsLittleEndian, CanonicalizeMode Mode=CanonicalizeMode::Canonical) | |
| ByteValue (const ByteValue &)=default | |
| ByteValue (ByteValue &&)=default | |
| ByteValue & | operator= (const ByteValue &)=default |
| ByteValue & | operator= (ByteValue &&)=default |
| ~ByteValue ()=default | |
| uint32_t | getBitWidth () const |
| ArrayRef< Byte > | bytes () const |
| MutableArrayRef< Byte > | mutableBytes () |
| The caller should call canonicalize after mutation. | |
| void | canonicalize (CanonicalizeMode Mode) |
| Make sure the padding byte is canonical. | |
| bool | isValid () const |
| LLVM_ABI void | print (Context &Ctx, raw_ostream &OS) const |
Static Public Member Functions | |
| static LLVM_ABI ByteValue | zero (uint32_t BitWidth, bool IsLittleEndian) |
| static LLVM_ABI ByteValue | poison (uint32_t BitWidth, bool IsLittleEndian) |
Represents a scalar byte value.
If the value is not byte-sized, the padding bits are guaranteed to be filled by either poison/zero bits.
Byte values do not contain undef bits. The only exception is Context::fromBytes, which converts undef bits into poison bits after constructor.
|
strong |
Definition at line 330 of file Value.cpp.
References llvm::ubi::Byte::concrete(), llvm::divideCeil(), getBitWidth(), I, and V.
Referenced by ByteValue(), ByteValue(), ByteValue(), operator=(), operator=(), poison(), zero(), and ~ByteValue().
|
inline |
Definition at line 276 of file Value.h.
References ByteValue(), Canonical, and Mode.
|
inline |
Definition at line 279 of file Value.h.
References assert(), Canonical, canonicalize(), isValid(), Mode, and llvm::move().
References ByteValue().
|
default |
References ByteValue().
|
default |
References ByteValue(), and LLVM_ABI.
|
inline |
Make sure the padding byte is canonical.
Definition at line 303 of file Value.h.
References assert(), Canonical, llvm::ubi::Byte::ConcreteMask, FlushNonCanonicalToPoison, llvm::ubi::Byte::isCanonicalPaddingByte(), isValid(), Mode, llvm::ubi::Byte::poison(), llvm::ubi::Byte::poisonBits(), and llvm::ubi::Byte::zeroBits().
Referenced by ByteValue(), and llvm::ubi::Context::freeze().
|
inline |
Definition at line 297 of file Value.h.
Referenced by ByteValue(), llvm::ubi::InstExecutor::visitBitExtractInst(), and llvm::ubi::InstExecutor::visitBitInsertInst().
|
inline |
Definition at line 322 of file Value.h.
References llvm::ubi::Byte::isCanonicalPaddingByte().
Referenced by ByteValue(), and canonicalize().
|
inline |
The caller should call canonicalize after mutation.
Definition at line 300 of file Value.h.
Referenced by llvm::ubi::Context::freeze(), and llvm::ubi::Context::fromBytes().
References ByteValue().
References ByteValue().
Definition at line 344 of file Value.cpp.
References ByteValue(), Canonical, llvm::divideCeil(), and llvm::ubi::Byte::poison().
Referenced by llvm::ubi::AnyValue::getPoisonValue().
| void llvm::ubi::ByteValue::print | ( | Context & | Ctx, |
| raw_ostream & | OS ) const |
Definition at line 350 of file Value.cpp.
References llvm::all_of(), llvm::ArrayRef(), llvm::ubi::AnyValue::asPointer(), assert(), DL, E(), llvm::PointerType::getUnqual(), llvm::hexdigit(), I, llvm::ubi::AnyValue::isPointer(), llvm::ubi::Pointer::print(), llvm::ArrayRef< T >::slice(), and V.
Definition at line 338 of file Value.cpp.
References ByteValue(), llvm::ubi::Byte::concrete(), and llvm::divideCeil().
Referenced by llvm::ubi::AnyValue::getNullValue().