FLANG

CodeGen.h
1 //===-- Optimizer/CodeGen/CodeGen.h -- code generation ----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef OPTIMIZER_CODEGEN_CODEGEN_H
10 #define OPTIMIZER_CODEGEN_CODEGEN_H
11
12 #include "mlir/Pass/Pass.h"
13 #include "mlir/Pass/PassRegistry.h"
14 #include <memory>
15
16 namespace fir {
17
18 struct NameUniquer;
19
22 std::unique_ptr<mlir::Pass> createFirCodeGenRewritePass();
23
25 std::unique_ptr<mlir::Pass> createFIRToLLVMPass(NameUniquer &uniquer);
26
28 std::unique_ptr<mlir::Pass>
29 createLLVMDialectToLLVMPass(llvm::raw_ostream &output);
30
31 inline void registerOptCodeGenPasses() {
32 using mlir::Pass;
33 // declarative passes
34 #define GEN_PASS_REGISTRATION
35 #include "flang/Optimizer/CodeGen/CGPasses.h.inc"
36 }
37
38 } // namespace fir
39
40 #endif // OPTIMIZER_CODEGEN_CODEGEN_H