36 assert(
Value.getBitWidth() == 128 &&
"expected a 128-bit value");
38 const uint64_t *Words =
Value.getRawData();
97std::pair<BinaryStreamWriter, BinaryStreamWriter>
112 const uint64_t ZerosSize = 64;
113 static constexpr char Zeros[ZerosSize] = {};
114 while (
Offset < NewOffset)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
An arbitrary precision integer that knows its signedness.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
Get the array size.
Provides read only access to a subclass of BinaryStream.
uint64_t bytesRemaining() const
LLVM_ABI Error readLongestContiguousChunk(ArrayRef< uint8_t > &Buffer)
Read as much as possible from the underlying string at the current offset without invoking a copy,...
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
LLVM_ABI Error writeCString(StringRef Str)
Write the string Str to the underlying stream followed by a null terminator.
Error writeArray(ArrayRef< T > Array)
Writes an array of objects of type T to the underlying stream, as if by using memcpy.
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
LLVM_ABI Error writeSLEB128(int64_t Value)
Write the unsigned integer Value to the underlying stream using ULEB128 encoding.
LLVM_ABI Error writeInt128(const APSInt &Value)
Write Value as a 128 bit integer (possibly truncated).
BinaryStreamWriter()=default
LLVM_ABI std::pair< BinaryStreamWriter, BinaryStreamWriter > split(uint64_t Off) const
Splits the Writer into two Writers at a given offset.
LLVM_ABI Error writeStreamRef(BinaryStreamRef Ref)
Efficiently reads all data from Ref, and writes it to this stream.
LLVM_ABI Error writeBytes(ArrayRef< uint8_t > Buffer)
Write the bytes specified in Buffer to the underlying stream.
uint64_t getLength() const
LLVM_ABI Error writeFixedString(StringRef Str)
Write the string Str to the underlying stream without a null terminator.
LLVM_ABI Error writeULEB128(uint64_t Value)
Write the unsigned integer Value to the underlying stream using ULEB128 encoding.
WritableBinaryStreamRef Stream
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
LLVM_ABI Error padToAlignment(uint32_t Align)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Represent a mutable reference to an array (0 or more elements consecutively in memory),...
Represent a constant reference to a string, i.e.
LLVM Value Representation.
A BinaryStream which can be read from as well as written to.
This is an optimization pass for GlobalISel generic memory operations.
ArrayRef< CharT > arrayRefFromStringRef(StringRef Input)
Construct an array ref of bytes from a string ref.
@ Off
Use window algorithm after SMS algorithm fails.
constexpr uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
@ Ref
The access may reference the value stored in memory.
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a SLEB128 value to an output stream.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.
This struct is a compact representation of a valid (non-zero power of two) alignment.