clang
24.0.0git
lib
CIR
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
9
#include "
clang/CIR/InitAllDialects.h
"
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
19
#include "
clang/CIR/Dialect/IR/CIRDialect.h
"
20
#include "
clang/CIR/Dialect/OpenACC/RegisterOpenACCExtensions.h
"
21
#include "
clang/CIR/Dialect/OpenMP/RegisterOpenMPExtensions.h
"
22
23
namespace
cir
{
24
25
void
registerAllDialects
(mlir::DialectRegistry ®istry) {
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.
33
cir::omp::registerOpenMPExtensions
(registry);
34
cir::acc::registerOpenACCExtensions
(registry);
35
}
36
37
void
registerAllDialects
(mlir::MLIRContext &context) {
38
mlir::DialectRegistry registry;
39
registerAllDialects
(registry);
40
context.appendDialectRegistry(registry);
41
}
42
43
}
// namespace cir
CIRDialect.h
InitAllDialects.h
RegisterOpenACCExtensions.h
RegisterOpenMPExtensions.h
cir::acc::registerOpenACCExtensions
void registerOpenACCExtensions(mlir::DialectRegistry ®istry)
Definition
RegisterOpenACCExtensions.cpp:20
cir::omp::registerOpenMPExtensions
void registerOpenMPExtensions(mlir::DialectRegistry ®istry)
Definition
RegisterOpenMPExtensions.cpp:31
cir
Definition
ABIArgInfo.h:22
cir::registerAllDialects
void registerAllDialects(mlir::DialectRegistry ®istry)
Definition
RegisterAllDialects.cpp:25
Generated on
for clang by
1.14.0