| 1 | //===- Passes.h - CIR pass entry points -------------------------*- 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 | // This header file defines prototypes that expose pass constructors. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef CLANG_CIR_DIALECT_PASSES_H |
| 14 | #define CLANG_CIR_DIALECT_PASSES_H |
| 15 | |
| 16 | #include "mlir/Pass/Pass.h" |
| 17 | |
| 18 | namespace clang { |
| 19 | class ASTContext; |
| 20 | } |
| 21 | namespace mlir { |
| 22 | |
| 23 | std::unique_ptr<Pass> createCIRCanonicalizePass(); |
| 24 | std::unique_ptr<Pass> createCIRFlattenCFGPass(); |
| 25 | std::unique_ptr<Pass> createCIRSimplifyPass(); |
| 26 | std::unique_ptr<Pass> createHoistAllocasPass(); |
| 27 | |
| 28 | void populateCIRPreLoweringPasses(mlir::OpPassManager &pm); |
| 29 | |
| 30 | //===----------------------------------------------------------------------===// |
| 31 | // Registration |
| 32 | //===----------------------------------------------------------------------===// |
| 33 | |
| 34 | void registerCIRDialectTranslation(mlir::MLIRContext &context); |
| 35 | |
| 36 | /// Generate the code for registering passes. |
| 37 | #define GEN_PASS_REGISTRATION |
| 38 | #include "clang/CIR/Dialect/Passes.h.inc" |
| 39 | |
| 40 | } // namespace mlir |
| 41 | |
| 42 | #endif // CLANG_CIR_DIALECT_PASSES_H |
| 43 | |