FLANG

Passes.h
1 //===-- Optimizer/Transforms/Passes.h ---------------------------*- 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_TRANSFORMS_PASSES_H
10 #define OPTIMIZER_TRANSFORMS_PASSES_H
11
12 #include "mlir/Pass/Pass.h"
13 #include "mlir/Pass/PassRegistry.h"
14 #include <memory>
15
16 namespace mlir {
17 class BlockAndValueMapping;
18 class Operation;
19 class Pass;
20 class Region;
21 } // namespace mlir
22
23 namespace fir {
24
26 std::unique_ptr<mlir::Pass> createControlFlowLoweringPass();
27
29 std::unique_ptr<mlir::Pass> createCSEPass();
30
32 std::unique_ptr<mlir::Pass> createPromoteToAffinePass();
33
37 std::unique_ptr<mlir::Pass> createFirToCfgPass();
38
43 std::unique_ptr<mlir::Pass> createMemToRegPass();
44
46 bool canLegallyInline(mlir::Operation *op, mlir::Region *reg,
47 mlir::BlockAndValueMapping &map);
48
49 inline void registerOptTransformPasses() {
50 using mlir::Pass;
51 // declarative passes
52 #define GEN_PASS_REGISTRATION
53 #include "flang/Optimizer/Transforms/Passes.h.inc"
54 }
55
56 } // namespace fir
57
58 #endif // OPTIMIZER_TRANSFORMS_PASSES_H
mlir
Definition: ConvertType.h:25