#include "Deserializer.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVEnums.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Location.h"
#include "mlir/Target/SPIRV/SPIRVBinaryUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Debug.h"
#include <optional>
usingnamespacemlir;
#define DEBUG_TYPE …
static inline spirv::Opcode extractOpcode(uint32_t word) { … }
Value spirv::Deserializer::getValue(uint32_t id) { … }
LogicalResult spirv::Deserializer::sliceInstruction(
spirv::Opcode &opcode, ArrayRef<uint32_t> &operands,
std::optional<spirv::Opcode> expectedOpcode) { … }
LogicalResult spirv::Deserializer::processInstruction(
spirv::Opcode opcode, ArrayRef<uint32_t> operands, bool deferInstructions) { … }
LogicalResult spirv::Deserializer::processOpWithoutGrammarAttr(
ArrayRef<uint32_t> words, StringRef opName, bool hasResult,
unsigned numOperands) { … }
LogicalResult spirv::Deserializer::processUndef(ArrayRef<uint32_t> operands) { … }
LogicalResult spirv::Deserializer::processExtInst(ArrayRef<uint32_t> operands) { … }
namespace mlir {
namespace spirv {
template <>
LogicalResult
Deserializer::processOp<spirv::EntryPointOp>(ArrayRef<uint32_t> words) { … }
template <>
LogicalResult
Deserializer::processOp<spirv::ExecutionModeOp>(ArrayRef<uint32_t> words) { … }
template <>
LogicalResult
Deserializer::processOp<spirv::FunctionCallOp>(ArrayRef<uint32_t> operands) { … }
template <>
LogicalResult
Deserializer::processOp<spirv::CopyMemoryOp>(ArrayRef<uint32_t> words) { … }
template <>
LogicalResult Deserializer::processOp<spirv::GenericCastToPtrExplicitOp>(
ArrayRef<uint32_t> words) { … }
#define GET_DESERIALIZATION_FNS
#include "mlir/Dialect/SPIRV/IR/SPIRVSerialization.inc"
}
}