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"
27#define GEN_PASS_DECL_FIRTOLLVMLOWERING
28#define GEN_PASS_DECL_CODEGENREWRITE
29#define GEN_PASS_DECL_REMATERIALIZEFIRBOXOPSPASS
30#define GEN_PASS_DECL_TARGETREWRITEPASS
31#define GEN_PASS_DECL_BOXEDPROCEDUREPASS
32#define GEN_PASS_DECL_LOWERREPACKARRAYSPASS
33#include "flang/Optimizer/CodeGen/CGPasses.h.inc"
44 bool ignoreMissingTypeDescriptors =
false;
47 bool skipExternalRttiDefinition =
false;
50 bool applyTBAA =
false;
53 bool forceUnifiedTBAATree =
false;
63 bool typeDescriptorsRenamedForAssembly =
false;
68 std::string cudaDescriptorAllocFunction;
78 std::string unifiedHeapAllocSuffix =
"_unified";
79 std::string managedHeapAllocSuffix =
"_managed";
88using LLVMIRLoweringPrinter =
89 std::function<void(llvm::Module &, llvm::raw_ostream &)>;
93 llvm::raw_ostream &output,
94 LLVMIRLoweringPrinter printer =
95 [](llvm::Module &m, llvm::raw_ostream &out) { m.print(out,
nullptr); });
104 bool preserveDeclare);
107#define GEN_PASS_REGISTRATION
108#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
std::unique_ptr< mlir::Pass > createFIRToLLVMPass()
Convert FIR to the LLVM IR dialect with default options.
Definition CodeGen.cpp:4954
void populatePreCGRewritePatterns(mlir::RewritePatternSet &patterns, bool preserveDeclare)
Populate the pattern set with the PreCGRewrite patterns.
Definition PreCGRewrite.cpp:473
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:4964
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:4969
FIR to LLVM translation pass options.
Definition CodeGen.h:36
Definition InternalNames.h:44