9#ifndef FORTRAN_OPTIMIZER_CODEGEN_CODEGEN_H
10#define FORTRAN_OPTIMIZER_CODEGEN_CODEGEN_H
12#include "mlir/IR/BuiltinOps.h"
13#include "mlir/Pass/Pass.h"
14#include "mlir/Pass/PassRegistry.h"
15#include "llvm/IR/Module.h"
16#include "llvm/Support/raw_ostream.h"
21class LLVMTypeConverter;
25#define GEN_PASS_DECL_FIRTOLLVMLOWERING
26#define GEN_PASS_DECL_CODEGENREWRITE
27#define GEN_PASS_DECL_TARGETREWRITEPASS
28#define GEN_PASS_DECL_BOXEDPROCEDUREPASS
29#include "flang/Optimizer/CodeGen/CGPasses.h.inc"
40 bool ignoreMissingTypeDescriptors =
false;
43 bool applyTBAA =
false;
46 bool forceUnifiedTBAATree =
false;
56 bool typeDescriptorsRenamedForAssembly =
false;
65using LLVMIRLoweringPrinter =
66 std::function<void(llvm::Module &, llvm::raw_ostream &)>;
70 llvm::raw_ostream &output,
71 LLVMIRLoweringPrinter printer =
72 [](llvm::Module &m, llvm::raw_ostream &out) { m.print(out,
nullptr); });
81 bool preserveDeclare);
84#define GEN_PASS_REGISTRATION
85#include "flang/Optimizer/CodeGen/CGPasses.h.inc"
Definition: TypeConverter.h:50
Definition: AbstractConverter.h:31
std::unique_ptr< mlir::Pass > createFIRToLLVMPass()
Convert FIR to the LLVM IR dialect with default options.
Definition: CodeGen.cpp:4027
void populatePreCGRewritePatterns(mlir::RewritePatternSet &patterns, bool preserveDeclare)
Populate the pattern set with the PreCGRewrite patterns.
Definition: PreCGRewrite.cpp:384
std::unique_ptr< mlir::Pass > createLLVMDialectToLLVMPass(llvm::raw_ostream &output, LLVMIRLoweringPrinter printer=[](llvm::Module &m, llvm::raw_ostream &out) { m.print(out, nullptr);})
Convert the LLVM IR dialect to LLVM-IR proper.
Definition: CodeGen.cpp:4037
void populateFIRToLLVMConversionPatterns(const fir::LLVMTypeConverter &converter, mlir::RewritePatternSet &patterns, fir::FIRToLLVMPassOptions &options)
Populate the given list with patterns that convert from FIR to LLVM.
Definition: CodeGen.cpp:4042
FIR to LLVM translation pass options.
Definition: CodeGen.h:32