Files
llvm/flang/lib/Optimizer/Support/InitFIR.cpp
Valentin Clement cd9cdc6837 [flang][openacc] Add missing piece to translate to LLVM IR dialect
Add missing pieces to translate handle OpenACC dialect in the translation.

Depends on D147825

Reviewed By: PeteSteinfeld, razvanlupusoru

Differential Revision: https://reviews.llvm.org/D147828
2023-04-10 14:30:25 -07:00

27 lines
1.2 KiB
C++

//===-- Optimizer/Support/InitFIR.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "flang/Optimizer/Support/InitFIR.h"
#include "mlir/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.h"
#include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"
#include "mlir/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.h"
#include "mlir/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.h"
void fir::support::registerLLVMTranslation(mlir::MLIRContext &context) {
mlir::DialectRegistry registry;
// Register OpenACC dialect interface here as well.
registerOpenACCDialectTranslation(registry);
// Register OpenMP dialect interface here as well.
registerOpenMPDialectTranslation(registry);
// Register LLVM-IR dialect interface.
registerLLVMDialectTranslation(registry);
// Register builtin dialect interface.
registerBuiltinDialectTranslation(registry);
context.appendDialectRegistry(registry);
}