//===- CompositePass.cpp - Composite pass code ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // CompositePass allows to run set of passes until fixed point is reached. // //===----------------------------------------------------------------------===// #include "mlir/Transforms/Passes.h" #include "mlir/Pass/Pass.h" #include "mlir/Pass/PassManager.h" namespace mlir { #define GEN_PASS_DEF_COMPOSITEFIXEDPOINTPASS #include "mlir/Transforms/Passes.h.inc" } // namespace mlir usingnamespacemlir; namespace { struct CompositeFixedPointPass final : public impl::CompositeFixedPointPassBase<CompositeFixedPointPass> { … }; } // namespace std::unique_ptr<Pass> mlir::createCompositeFixedPointPass( std::string name, llvm::function_ref<void(OpPassManager &)> populateFunc, int maxIterations) { … }