| 1 | //===-- Optimizer/Support/InitFIR.cpp -------------------------------------===// |
| 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 "flang/Optimizer/Support/InitFIR.h" |
| 10 | #include "mlir/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.h" |
| 11 | #include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h" |
| 12 | #include "mlir/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.h" |
| 13 | #include "mlir/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.h" |
| 14 | |
| 15 | void fir::support::registerLLVMTranslation(mlir::MLIRContext &context) { |
| 16 | mlir::DialectRegistry registry; |
| 17 | // Register OpenACC dialect interface here as well. |
| 18 | registerOpenACCDialectTranslation(registry); |
| 19 | // Register OpenMP dialect interface here as well. |
| 20 | registerOpenMPDialectTranslation(registry); |
| 21 | // Register LLVM-IR dialect interface. |
| 22 | registerLLVMDialectTranslation(registry); |
| 23 | // Register builtin dialect interface. |
| 24 | registerBuiltinDialectTranslation(registry); |
| 25 | context.appendDialectRegistry(registry); |
| 26 | } |
| 27 | |