MLIR  20.0.0git
Namespaces | Functions | Variables
SPIRVBinaryUtils.h File Reference
#include "mlir/Dialect/SPIRV/IR/SPIRVEnums.h"
#include "mlir/Support/LLVM.h"
#include <cstdint>

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::spirv
 

Functions

void mlir::spirv::appendModuleHeader (SmallVectorImpl< uint32_t > &header, spirv::Version version, uint32_t idBound)
 Appends a SPRI-V module header to header with the given version and idBound. More...
 
uint32_t mlir::spirv::getPrefixedOpcode (uint32_t wordCount, spirv::Opcode opcode)
 Returns the word-count-prefixed opcode for an SPIR-V instruction. More...
 
void mlir::spirv::encodeStringLiteralInto (SmallVectorImpl< uint32_t > &binary, StringRef literal)
 Encodes an SPIR-V literal string into the given binary vector. More...
 
StringRef mlir::spirv::decodeStringLiteral (ArrayRef< uint32_t > words, unsigned &wordIndex)
 Decodes a string literal in words starting at wordIndex. More...
 

Variables

constexpr unsigned mlir::spirv::kHeaderWordCount = 5
 SPIR-V binary header word count. More...
 
constexpr uint32_t mlir::spirv::kMagicNumber = 0x07230203
 SPIR-V magic number. More...
 
constexpr uint32_t mlir::spirv::kGeneratorNumber = 22
 The serializer tool ID registered to the Khronos Group. More...