9#ifndef FORTRAN_OPTIMIZER_CODEGEN_CODEGEN_H
10#define FORTRAN_OPTIMIZER_CODEGEN_CODEGEN_H
12#include "flang/Frontend/CodeGenOptions.h"
13#include "mlir/IR/BuiltinOps.h"
14#include "mlir/Pass/Pass.h"
15#include "mlir/Pass/PassRegistry.h"
16#include "llvm/IR/Module.h"
17#include "llvm/Support/raw_ostream.h"
22class SymbolTableCollection;
31#define GEN_PASS_DECL_FIRTOLLVMLOWERING
32#define GEN_PASS_DECL_CODEGENREWRITE
33#define GEN_PASS_DECL_REMATERIALIZEFIRBOXOPSPASS
34#define GEN_PASS_DECL_TARGETREWRITEPASS
35#define GEN_PASS_DECL_BOXEDPROCEDUREPASS
36#define GEN_PASS_DECL_LOWERREPACKARRAYSPASS
37#include "flang/Optimizer/CodeGen/CGPasses.h.inc"
48 bool ignoreMissingTypeDescriptors =
false;
51 bool skipExternalRttiDefinition =
false;
54 bool applyTBAA =
false;
57 bool forceUnifiedTBAATree =
false;
67 bool typeDescriptorsRenamedForAssembly =
false;
72 std::string cudaDescriptorAllocFunction;
82 std::string unifiedHeapAllocSuffix =
"_unified";
83 std::string managedHeapAllocSuffix =
"_managed";
92using LLVMIRLoweringPrinter =
93 std::function<void(llvm::Module &, llvm::raw_ostream &)>;
97 llvm::raw_ostream &output, LLVMIRLoweringPrinter printer =
98 [](llvm::Module &m, llvm::raw_ostream &out) {
99 m.renumberMetadataForAssembly();
100 m.print(out,
nullptr);
111 mlir::SymbolTableCollection *symbolTables =
nullptr);
115 bool preserveDeclare);
118#define GEN_PASS_REGISTRATION
119#include "flang/Optimizer/CodeGen/CGPasses.h.inc"
ComplexRangeKind
Controls the various implementations for complex division.
Definition CodeGenOptions.h:211
@ CX_Full
Definition CodeGenOptions.h:215
Definition TypeConverter.h:49
Definition AbstractConverter.h:37
void populateFIRToLLVMConversionPatterns(const fir::LLVMTypeConverter &converter, mlir::RewritePatternSet &patterns, fir::FIRToLLVMPassOptions &options, mlir::SymbolTableCollection *symbolTables=nullptr)
Definition CodeGen.cpp:5385
std::unique_ptr< mlir::Pass > createFIRToLLVMPass()
Convert FIR to the LLVM IR dialect with default options.
Definition CodeGen.cpp:5370
void populatePreCGRewritePatterns(mlir::RewritePatternSet &patterns, bool preserveDeclare)
Populate the pattern set with the PreCGRewrite patterns.
Definition PreCGRewrite.cpp:621
std::unique_ptr< mlir::Pass > createLLVMDialectToLLVMPass(llvm::raw_ostream &output, LLVMIRLoweringPrinter printer=[](llvm::Module &m, llvm::raw_ostream &out) { m.renumberMetadataForAssembly();m.print(out, nullptr);})
Convert the LLVM IR dialect to LLVM-IR proper.
Definition CodeGen.cpp:5380
Definition AbstractConverter.h:32
FIR to LLVM translation pass options.
Definition CodeGen.h:40
Definition InternalNames.h:44