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/Arith/IR/Arith.h"
12#include "mlir/Dialect/DLTI/DLTI.h"
13#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
14#include "mlir/Dialect/OpenACC/OpenACC.h"
15#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
16#include "mlir/IR/BuiltinDialect.h"
17#include "mlir/IR/MLIRContext.h"
18
22
23namespace cir {
24
25void registerAllDialects(mlir::DialectRegistry &registry) {
26 // The LLVM dialect is needed to parse CIR: data layout specs use LLVM
27 // pointer types as keys.
28 registry
29 .insert<mlir::BuiltinDialect, cir::CIRDialect, mlir::arith::ArithDialect,
30 mlir::DLTIDialect, mlir::LLVM::LLVMDialect,
31 mlir::omp::OpenMPDialect, mlir::acc::OpenACCDialect>();
32 // Register extensions to integrate CIR types with OpenACC and OpenMP.
35}
36
37void registerAllDialects(mlir::MLIRContext &context) {
38 mlir::DialectRegistry registry;
39 registerAllDialects(registry);
40 context.appendDialectRegistry(registry);
41}
42
43} // namespace cir
void registerOpenACCExtensions(mlir::DialectRegistry &registry)
void registerOpenMPExtensions(mlir::DialectRegistry &registry)
void registerAllDialects(mlir::DialectRegistry &registry)