LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::dxil::DXILBitcodeWriter Class Reference

Public Member Functions

 DXILBitcodeWriter (const Module &M, SmallVectorImpl< char > &Buffer, StringTableBuilder &StrtabBuilder, BitstreamWriter &Stream)
 Constructs a ModuleBitcodeWriter object for the given Module, writing to the provided Buffer.
 
void write ()
 Emit the current module to the bitstream.
 

Static Public Member Functions

static uint64_t getAttrKindEncoding (Attribute::AttrKind Kind)
 
static void writeStringRecord (BitstreamWriter &Stream, unsigned Code, StringRef Str, unsigned AbbrevToUse)
 
static void writeIdentificationBlock (BitstreamWriter &Stream)
 
static void emitSignedInt64 (SmallVectorImpl< uint64_t > &Vals, uint64_t V)
 
static void emitWideAPInt (SmallVectorImpl< uint64_t > &Vals, const APInt &A)
 
static unsigned getEncodedComdatSelectionKind (const Comdat &C)
 
static unsigned getEncodedLinkage (const GlobalValue::LinkageTypes Linkage)
 
static unsigned getEncodedLinkage (const GlobalValue &GV)
 
static unsigned getEncodedVisibility (const GlobalValue &GV)
 
static unsigned getEncodedThreadLocalMode (const GlobalValue &GV)
 
static unsigned getEncodedDLLStorageClass (const GlobalValue &GV)
 
static unsigned getEncodedCastOpcode (unsigned Opcode)
 Begin dxil::BitcodeWriterBase Implementation.
 
static unsigned getEncodedUnaryOpcode (unsigned Opcode)
 
static unsigned getEncodedBinaryOpcode (unsigned Opcode)
 
static unsigned getEncodedRMWOperation (AtomicRMWInst::BinOp Op)
 
static unsigned getEncodedOrdering (AtomicOrdering Ordering)
 
static uint64_t getOptimizationFlags (const Value *V)
 

Detailed Description

Definition at line 65 of file DXILBitcodeWriter.cpp.

Constructor & Destructor Documentation

◆ DXILBitcodeWriter()

llvm::dxil::DXILBitcodeWriter::DXILBitcodeWriter ( const Module M,
SmallVectorImpl< char > &  Buffer,
StringTableBuilder StrtabBuilder,
BitstreamWriter Stream 
)
inline

Constructs a ModuleBitcodeWriter object for the given Module, writing to the provided Buffer.

Definition at line 133 of file DXILBitcodeWriter.cpp.

References llvm::dxil::ValueEnumerator::EnumerateType(), and llvm::dxil::ValueEnumerator::getValues().

Member Function Documentation

◆ emitSignedInt64()

void DXILBitcodeWriter::emitSignedInt64 ( SmallVectorImpl< uint64_t > &  Vals,
uint64_t  V 
)
static

◆ emitWideAPInt()

void DXILBitcodeWriter::emitWideAPInt ( SmallVectorImpl< uint64_t > &  Vals,
const APInt A 
)
static

Definition at line 728 of file DXILBitcodeWriter.cpp.

References A, and emitSignedInt64().

◆ getAttrKindEncoding()

uint64_t DXILBitcodeWriter::getAttrKindEncoding ( Attribute::AttrKind  Kind)
static

Definition at line 615 of file DXILBitcodeWriter.cpp.

References llvm::bitc::ATTR_KIND_ALIGNMENT, llvm::bitc::ATTR_KIND_ALWAYS_INLINE, llvm::bitc::ATTR_KIND_BUILTIN, llvm::bitc::ATTR_KIND_BY_VAL, llvm::bitc::ATTR_KIND_COLD, llvm::bitc::ATTR_KIND_CONVERGENT, llvm::bitc::ATTR_KIND_DEREFERENCEABLE, llvm::bitc::ATTR_KIND_DEREFERENCEABLE_OR_NULL, llvm::bitc::ATTR_KIND_IN_ALLOCA, llvm::bitc::ATTR_KIND_IN_REG, llvm::bitc::ATTR_KIND_INLINE_HINT, llvm::bitc::ATTR_KIND_JUMP_TABLE, llvm::bitc::ATTR_KIND_MIN_SIZE, llvm::bitc::ATTR_KIND_NAKED, llvm::bitc::ATTR_KIND_NEST, llvm::bitc::ATTR_KIND_NO_ALIAS, llvm::bitc::ATTR_KIND_NO_BUILTIN, llvm::bitc::ATTR_KIND_NO_CAPTURE, llvm::bitc::ATTR_KIND_NO_DUPLICATE, llvm::bitc::ATTR_KIND_NO_IMPLICIT_FLOAT, llvm::bitc::ATTR_KIND_NO_INLINE, llvm::bitc::ATTR_KIND_NO_RED_ZONE, llvm::bitc::ATTR_KIND_NO_RETURN, llvm::bitc::ATTR_KIND_NO_UNWIND, llvm::bitc::ATTR_KIND_NON_LAZY_BIND, llvm::bitc::ATTR_KIND_NON_NULL, llvm::bitc::ATTR_KIND_OPTIMIZE_FOR_SIZE, llvm::bitc::ATTR_KIND_OPTIMIZE_NONE, llvm::bitc::ATTR_KIND_READ_NONE, llvm::bitc::ATTR_KIND_READ_ONLY, llvm::bitc::ATTR_KIND_RETURNED, llvm::bitc::ATTR_KIND_RETURNS_TWICE, llvm::bitc::ATTR_KIND_S_EXT, llvm::bitc::ATTR_KIND_SAFESTACK, llvm::bitc::ATTR_KIND_SANITIZE_ADDRESS, llvm::bitc::ATTR_KIND_SANITIZE_MEMORY, llvm::bitc::ATTR_KIND_SANITIZE_THREAD, llvm::bitc::ATTR_KIND_STACK_ALIGNMENT, llvm::bitc::ATTR_KIND_STACK_PROTECT, llvm::bitc::ATTR_KIND_STACK_PROTECT_REQ, llvm::bitc::ATTR_KIND_STACK_PROTECT_STRONG, llvm::bitc::ATTR_KIND_STRUCT_RET, llvm::bitc::ATTR_KIND_UW_TABLE, llvm::bitc::ATTR_KIND_Z_EXT, llvm::Attribute::EmptyKey, llvm::Attribute::EndAttrKinds, llvm_unreachable, llvm::Attribute::None, and llvm::Attribute::TombstoneKey.

◆ getEncodedBinaryOpcode()

unsigned DXILBitcodeWriter::getEncodedBinaryOpcode ( unsigned  Opcode)
static

◆ getEncodedCastOpcode()

unsigned DXILBitcodeWriter::getEncodedCastOpcode ( unsigned  Opcode)
static

◆ getEncodedComdatSelectionKind()

unsigned DXILBitcodeWriter::getEncodedComdatSelectionKind ( const Comdat C)
static

◆ getEncodedDLLStorageClass()

unsigned DXILBitcodeWriter::getEncodedDLLStorageClass ( const GlobalValue GV)
static

◆ getEncodedLinkage() [1/2]

unsigned DXILBitcodeWriter::getEncodedLinkage ( const GlobalValue GV)
static

Definition at line 800 of file DXILBitcodeWriter.cpp.

References getEncodedLinkage(), and llvm::GlobalValue::getLinkage().

◆ getEncodedLinkage() [2/2]

unsigned DXILBitcodeWriter::getEncodedLinkage ( const GlobalValue::LinkageTypes  Linkage)
static

◆ getEncodedOrdering()

unsigned DXILBitcodeWriter::getEncodedOrdering ( AtomicOrdering  Ordering)
static

◆ getEncodedRMWOperation()

unsigned DXILBitcodeWriter::getEncodedRMWOperation ( AtomicRMWInst::BinOp  Op)
static

◆ getEncodedThreadLocalMode()

unsigned DXILBitcodeWriter::getEncodedThreadLocalMode ( const GlobalValue GV)
static

◆ getEncodedUnaryOpcode()

unsigned DXILBitcodeWriter::getEncodedUnaryOpcode ( unsigned  Opcode)
static

Definition at line 467 of file DXILBitcodeWriter.cpp.

References llvm_unreachable, and llvm::bitc::UNOP_FNEG.

◆ getEncodedVisibility()

unsigned DXILBitcodeWriter::getEncodedVisibility ( const GlobalValue GV)
static

◆ getOptimizationFlags()

uint64_t DXILBitcodeWriter::getOptimizationFlags ( const Value V)
static

◆ write()

void DXILBitcodeWriter::write ( )

Emit the current module to the bitstream.

WriteModule - Emit the specified module to the bitstream.

Definition at line 2864 of file DXILBitcodeWriter.cpp.

References llvm::BitstreamWriter::EnterSubblock(), llvm::BitstreamWriter::ExitBlock(), F, and llvm::bitc::MODULE_BLOCK_ID.

Referenced by llvm::dxil::BitcodeWriter::writeModule().

◆ writeIdentificationBlock()

static void llvm::dxil::DXILBitcodeWriter::writeIdentificationBlock ( BitstreamWriter Stream)
static

◆ writeStringRecord()

void DXILBitcodeWriter::writeStringRecord ( BitstreamWriter Stream,
unsigned  Code,
StringRef  Str,
unsigned  AbbrevToUse 
)
static

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