MLIR 22.0.0git
Deserialization.cpp
Go to the documentation of this file.
1//===- Deserialization.cpp - MLIR SPIR-V Deserialization ------------------===//
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
10
11#include "Deserializer.h"
12
13using namespace mlir;
14
18 Deserializer deserializer(binary, context, options);
19
20 if (failed(deserializer.deserialize()))
21 return nullptr;
22
23 return deserializer.collect();
24}
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
A SPIR-V module serializer.
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.