| 1 | //===----------------------------------------------------------------------===// |
| 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 file declares an interface for running CIR-to-CIR passes. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef CLANG_CIR_CIRTOCIRPASSES_H |
| 14 | #define CLANG_CIR_CIRTOCIRPASSES_H |
| 15 | |
| 16 | #include "mlir/Pass/Pass.h" |
| 17 | |
| 18 | #include <memory> |
| 19 | |
| 20 | namespace mlir { |
| 21 | class MLIRContext; |
| 22 | class ModuleOp; |
| 23 | } // namespace mlir |
| 24 | |
| 25 | namespace cir { |
| 26 | |
| 27 | // Run set of cleanup/prepare/etc passes CIR <-> CIR. |
| 28 | mlir::LogicalResult |
| 29 | runCIRToCIRPasses(mlir::ModuleOp theModule, mlir::MLIRContext &mlirCtx, |
| 30 | bool enableVerifier, bool enableIdiomRecognizer, |
| 31 | bool enableCIRSimplify, bool enableLibOpt, |
| 32 | llvm::StringRef libOptOptions, bool enableCallConvLowering); |
| 33 | |
| 34 | } // namespace cir |
| 35 | |
| 36 | #endif // CLANG_CIR_CIRTOCIRPASSES_H_ |
| 37 | |