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