MLIR 22.0.0git
SPIRVToLLVMIRTranslation.cpp
Go to the documentation of this file.
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
17
18using namespace mlir;
19using namespace mlir::LLVM;
20
22 registry.insert<spirv::SPIRVDialect>();
23}
24
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
void appendDialectRegistry(const DialectRegistry &registry)
Append the contents of the given dialect registry to the registry associated with this context.
Include the generated interface declarations.
void registerSPIRVDialectTranslation(DialectRegistry &registry)
Register the SPIR-V dialect and the translation from it to the LLVM IR in the given registry;.