MLIR 24.0.0git
All.h
Go to the documentation of this file.
1//===- All.h - MLIR To LLVM IR Translation Registration ---------*- C++ -*-===//
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 defines a helper to register the translations of all suitable
10// dialects to LLVM IR.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_TARGET_LLVMIR_DIALECT_ALL_H
15#define MLIR_TARGET_LLVMIR_DIALECT_ALL_H
16
34
35namespace mlir {
36class DialectRegistry;
37
38/// Registers all dialects that can be translated to LLVM IR and the
39/// corresponding translation interfaces.
40static inline void registerAllToLLVMIRTranslations(DialectRegistry &registry) {
41 // The module translation reads DLTI attributes, and the DLTI dialect has no
42 // translation interface of its own to be registered through.
43 registry.insert<DLTIDialect>();
44
59
60 // Extension required for translating GPU offloading Ops.
62}
63
64/// Registers all the translations to LLVM IR required by GPU passes.
65/// TODO: Remove this function when a safe dialect interface registration
66/// mechanism is implemented, see D157703.
67static inline void
80
81/// Registers all dialects that can be translated from LLVM IR and the
82/// corresponding translation interfaces.
83static inline void
85 // The import expresses the module's data layout with DLTI attributes.
86 registry.insert<DLTIDialect>();
87
90}
91} // namespace mlir
92
93#endif // MLIR_TARGET_LLVMIR_DIALECT_ALL_H
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
void registerOffloadingLLVMTranslationInterfaceExternalModels(mlir::DialectRegistry &registry)
Registers the offloading LLVM translation interfaces for gpu.select_object.
Include the generated interface declarations.
void registerPtrDialectTranslation(DialectRegistry &registry)
Register the ptr dialect and the translation from it to the LLVM IR in the given registry;.
void registerNVVMDialectTranslation(DialectRegistry &registry)
Register the NVVM dialect and the translation from it to the LLVM IR in the given registry;.
void registerArmSMEDialectTranslation(DialectRegistry &registry)
Register the ArmSME dialect and the translation from it to the LLVM IR in the given registry;.
void registerArmSVEDialectTranslation(DialectRegistry &registry)
Register the ArmSVE dialect and the translation from it to the LLVM IR in the given registry;.
void registerNVVMDialectImport(DialectRegistry &registry)
Registers the NVVM dialect and its import from LLVM IR in the given registry.
static void registerAllFromLLVMIRTranslations(DialectRegistry &registry)
Registers all dialects that can be translated from LLVM IR and the corresponding translation interfac...
Definition All.h:84
void registerOpenMPDialectTranslation(DialectRegistry &registry)
Register the OpenMP dialect and the translation from it to the LLVM IR in the given registry;.
static void registerAllGPUToLLVMIRTranslations(DialectRegistry &registry)
Registers all the translations to LLVM IR required by GPU passes.
Definition All.h:68
void registerBuiltinDialectTranslation(DialectRegistry &registry)
Register the translation from the builtin dialect to the LLVM IR in the given registry.
void registerLLVMDialectTranslation(DialectRegistry &registry)
Register the LLVM dialect and the translation from it to the LLVM IR in the given registry;.
void registerVCIXDialectTranslation(DialectRegistry &registry)
Register the VCIX dialect and the translation from it to the LLVM IR in the given registry.
void registerGPUDialectTranslation(DialectRegistry &registry)
Register the GPU dialect and the translation from it to the LLVM IR in the given registry;.
void registerXeVMDialectTranslation(mlir::DialectRegistry &registry)
Register the XeVM dialect and the translation from it to the LLVM IR in the given registry;.
void registerLLVMDialectImport(DialectRegistry &registry)
Registers the LLVM dialect and its import from LLVM IR in the given registry.
void registerROCDLDialectTranslation(DialectRegistry &registry)
Register the ROCDL dialect and the translation from it to the LLVM IR in the given registry;.
void registerArmNeonDialectTranslation(DialectRegistry &registry)
Register the ArmNeon dialect and the translation from it to the LLVM IR in the given registry;.
static void registerAllToLLVMIRTranslations(DialectRegistry &registry)
Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces...
Definition All.h:40
void registerSPIRVDialectTranslation(DialectRegistry &registry)
Register the SPIR-V dialect and the translation from it to the LLVM IR in the given registry;.
void registerOpenACCDialectTranslation(DialectRegistry &registry)
Register the OpenACC dialect and the translation from it to the LLVM IR in the given registry.