tco is a tool to test the FIR to LLVM IR pipeline of the Flang compiler. This patch update tco pipelines and adds the translation to LLVM IR. A simple test is added to make sure the tool is working with a simple FIR program. More tests will be upstream in follow up patch from the fir-dev branch. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: kiranchandramohan, awarzynski, schweitz, mehdi_amini Differential Revision: https://reviews.llvm.org/D117781 Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Co-authored-by: Jean Perier <jperier@nvidia.com> Co-authored-by: Andrzej Warzynski <andrzej.warzynski@arm.com>
21 lines
902 B
C++
21 lines
902 B
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/LLVMIR/LLVMToLLVMIRTranslation.h"
|
|
#include "mlir/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.h"
|
|
|
|
void fir::support::registerLLVMTranslation(mlir::MLIRContext &context) {
|
|
mlir::DialectRegistry registry;
|
|
// Register OpenMP dialect interface here as well.
|
|
mlir::registerOpenMPDialectTranslation(registry);
|
|
// Register LLVM-IR dialect interface.
|
|
registerLLVMDialectTranslation(registry);
|
|
context.appendDialectRegistry(registry);
|
|
}
|