Files
clang-p2996/mlir/lib/Target/SPIRV/Deserialization/Deserialization.cpp
Lei Zhang 8349fa0fdd [mlir][spirv] NFC: split deserialization into multiple source files
This avoids large source files and gives a better structure. It also
allows leveraging compilation parallelism.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D94360
2021-01-12 11:21:03 -05:00

24 lines
772 B
C++

//===- Deserialization.cpp - MLIR SPIR-V Deserialization ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "mlir/Target/SPIRV/Deserialization.h"
#include "Deserializer.h"
namespace mlir {
spirv::OwningSPIRVModuleRef spirv::deserialize(ArrayRef<uint32_t> binary,
MLIRContext *context) {
Deserializer deserializer(binary, context);
if (failed(deserializer.deserialize()))
return nullptr;
return deserializer.collect();
}
} // namespace mlir