clang 24.0.0git
RegisterAllDialects.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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
10
11#include "mlir/Dialect/DLTI/DLTI.h"
12#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
13#include "mlir/Dialect/OpenACC/OpenACC.h"
14#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
15#include "mlir/IR/BuiltinDialect.h"
16#include "mlir/IR/MLIRContext.h"
17
21
22namespace cir {
23
24void registerAllDialects(mlir::DialectRegistry &registry) {
25 // The LLVM dialect is needed to parse CIR: data layout specs use LLVM
26 // pointer types as keys.
27 registry.insert<mlir::BuiltinDialect, cir::CIRDialect, mlir::DLTIDialect,
28 mlir::LLVM::LLVMDialect, mlir::omp::OpenMPDialect,
29 mlir::acc::OpenACCDialect>();
30 // Register extensions to integrate CIR types with OpenACC and OpenMP.
33}
34
35void registerAllDialects(mlir::MLIRContext &context) {
36 mlir::DialectRegistry registry;
37 registerAllDialects(registry);
38 context.appendDialectRegistry(registry);
39}
40
41} // namespace cir
void registerOpenACCExtensions(mlir::DialectRegistry &registry)
void registerOpenMPExtensions(mlir::DialectRegistry &registry)
void registerAllDialects(mlir::DialectRegistry &registry)