LLVM  15.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. More...
 
void write ()
 Emit the current module to the bitstream. More...
 

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. More...
 
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 63 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 131 of file DXILBitcodeWriter.cpp.

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

Member Function Documentation

◆ emitSignedInt64()

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

Definition at line 748 of file DXILBitcodeWriter.cpp.

Referenced by emitWideAPInt().

◆ emitWideAPInt()

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

Definition at line 756 of file DXILBitcodeWriter.cpp.

References emitSignedInt64(), and i.

◆ getAttrKindEncoding()

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

Definition at line 641 of file DXILBitcodeWriter.cpp.

References llvm::bitc::ATTR_KIND_ALIGNMENT, llvm::bitc::ATTR_KIND_ALWAYS_INLINE, llvm::bitc::ATTR_KIND_ARGMEMONLY, 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::CallingConv::Cold, llvm::MCID::Convergent, llvm::Attribute::EmptyKey, llvm::Attribute::EndAttrKinds, JumpTable, 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 828 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 505 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 2915 of file DXILBitcodeWriter.cpp.

References F, M, 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

Definition at line 625 of file DXILBitcodeWriter.cpp.

References llvm::BitCodeAbbrevOp::isChar6().


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