[OpenACC] Implement 'device_type' for 'data' construct
[llvm-project.git] / mlir / lib / Target / SPIRV / Deserialization / Deserialization.cpp
blob7bb87626605997918a10e6b136ca52b68e735aab
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 //===----------------------------------------------------------------------===//
9 #include "mlir/Target/SPIRV/Deserialization.h"
11 #include "Deserializer.h"
13 using namespace mlir;
15 OwningOpRef<spirv::ModuleOp> spirv::deserialize(ArrayRef<uint32_t> binary,
16 MLIRContext *context) {
17 Deserializer deserializer(binary, context);
19 if (failed(deserializer.deserialize()))
20 return nullptr;
22 return deserializer.collect();