1 //===-- Optimizer/Support/InitFIR.cpp -------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
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/OpenMP/OpenMPToLLVMIRTranslation.h"
14 void fir::support::registerLLVMTranslation(mlir::MLIRContext
&context
) {
15 mlir::DialectRegistry registry
;
16 // Register OpenMP dialect interface here as well.
17 registerOpenMPDialectTranslation(registry
);
18 // Register LLVM-IR dialect interface.
19 registerLLVMDialectTranslation(registry
);
20 // Register builtin dialect interface.
21 registerBuiltinDialectTranslation(registry
);
22 context
.appendDialectRegistry(registry
);