MLIR 22.0.0git
Deserialization.h
Go to the documentation of this file.
1//===- Serialization.h - MLIR SPIR-V (De)serialization ----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the entry points for deserializing SPIR-V binary modules.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_TARGET_SPIRV_DESERIALIZATION_H
14#define MLIR_TARGET_SPIRV_DESERIALIZATION_H
15
16#include "mlir/IR/OwningOpRef.h"
17#include "mlir/Support/LLVM.h"
18#include <cstdint>
19
20namespace mlir {
21class MLIRContext;
22
23namespace spirv {
24class ModuleOp;
25
27 // Whether to structurize control flow into `spirv.mlir.selection` and
28 // `spirv.mlir.loop`.
30};
31
32/// Deserializes the given SPIR-V `binary` module and creates a MLIR ModuleOp
33/// in the given `context`. Returns the ModuleOp on success; otherwise, reports
34/// errors to the error handler registered with `context` and returns a null
35/// module.
39
40} // namespace spirv
41} // namespace mlir
42
43#endif // MLIR_TARGET_SPIRV_DESERIALIZATION_H
static llvm::ManagedStatic< PassManagerOptions > options
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
This class acts as an owning reference to an op, and will automatically destroy the held op on destru...
Definition OwningOpRef.h:29
OwningOpRef< spirv::ModuleOp > deserialize(ArrayRef< uint32_t > binary, MLIRContext *context, const DeserializationOptions &options={})
Deserializes the given SPIR-V binary module and creates a MLIR ModuleOp in the given context.
Include the generated interface declarations.