1//===- SPIRVToLLVMIRTranslation.cpp - Translate SPIR-V to LLVM IR ---------===//
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 implements a translation between the MLIR SPIR-V dialect and
10// LLVM IR.
11//
12//===----------------------------------------------------------------------===//
13
14#include "mlir/Target/LLVMIR/Dialect/SPIRV/SPIRVToLLVMIRTranslation.h"
15#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
16#include "mlir/Target/LLVMIR/ModuleTranslation.h"
17
18using namespace mlir;
19using namespace mlir::LLVM;
20
21void mlir::registerSPIRVDialectTranslation(DialectRegistry &registry) {
22 registry.insert<spirv::SPIRVDialect>();
23}
24
25void mlir::registerSPIRVDialectTranslation(MLIRContext &context) {
26 DialectRegistry registry;
27 registerSPIRVDialectTranslation(registry);
28 context.appendDialectRegistry(registry);
29}
30

source code of mlir/lib/Target/LLVMIR/Dialect/SPIRV/SPIRVToLLVMIRTranslation.cpp