mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-03 06:10:23 +00:00
[flang] Add the header file for the conversion of FIR(MLIR) to LLVM-IR dialect
Summary: This is the interface to the conversion pass that converts the FIR dialect (and standard dialects) of MLIR to the LLVM-IR dialect. The implementation of this bridge will be forthcoming in subsequent diffs. The purpose of the code gen bridge is to take the IR, which will be expressed as a mix of higher-level Fortran constructs as expressed in the FIR dialect and the MLIR standard dialect, and convert the representation into the LLVM-IR dialect. At that point, the LLVM-IR dialect can be converted into LLVM IR (proper) by a standard MLIR pass. Reviewers: jeanPerier, vjayathirtha-nv, sscalpone, jdoerfert, DavidTruby, kiranchandramohan Reviewed By: sscalpone, kiranchandramohan Tags: #llvm, #flang Differential Revision: https://reviews.llvm.org/D79177
This commit is contained in:
parent
1c1d9d9d7f
commit
d93ae65253
34
flang/include/flang/Optimizer/CodeGen/CodeGen.h
Normal file
34
flang/include/flang/Optimizer/CodeGen/CodeGen.h
Normal file
@ -0,0 +1,34 @@
|
||||
//===-- Optimizer/CodeGen/CodeGen.h -- code generation ----------*- C++ -*-===//
|
||||
//
|
||||
// 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
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef OPTIMIZER_CODEGEN_CODEGEN_H
|
||||
#define OPTIMIZER_CODEGEN_CODEGEN_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
class raw_ostream;
|
||||
}
|
||||
namespace mlir {
|
||||
class Pass;
|
||||
}
|
||||
|
||||
namespace fir {
|
||||
|
||||
struct NameUniquer;
|
||||
|
||||
/// Convert FIR to the LLVM IR dialect
|
||||
std::unique_ptr<mlir::Pass> createFIRToLLVMPass(NameUniquer &uniquer);
|
||||
|
||||
/// Convert the LLVM IR dialect to LLVM-IR proper
|
||||
std::unique_ptr<mlir::Pass>
|
||||
createLLVMDialectToLLVMPass(llvm::raw_ostream &output);
|
||||
|
||||
} // namespace fir
|
||||
|
||||
#endif // OPTIMIZER_CODEGEN_CODEGEN_H
|
Loading…
Reference in New Issue
Block a user