1c30ab6c2SEugene Zhulenev //===- PassDetail.h - Async Pass class details ------------------*- C++ -*-===// 2c30ab6c2SEugene Zhulenev // 3c30ab6c2SEugene Zhulenev // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4c30ab6c2SEugene Zhulenev // See https://llvm.org/LICENSE.txt for license information. 5c30ab6c2SEugene Zhulenev // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6c30ab6c2SEugene Zhulenev // 7c30ab6c2SEugene Zhulenev //===----------------------------------------------------------------------===// 8c30ab6c2SEugene Zhulenev 9c30ab6c2SEugene Zhulenev #ifndef DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_ 10c30ab6c2SEugene Zhulenev #define DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_ 11c30ab6c2SEugene Zhulenev 1236d3efeaSRiver Riddle #include "mlir/IR/BuiltinOps.h" 13c30ab6c2SEugene Zhulenev #include "mlir/IR/Dialect.h" 14c30ab6c2SEugene Zhulenev #include "mlir/Pass/Pass.h" 15c30ab6c2SEugene Zhulenev 16c30ab6c2SEugene Zhulenev namespace mlir { 17c30ab6c2SEugene Zhulenev 18a54f4eaeSMogball namespace arith { 19*abc362a1SJakub Kuderski class ArithDialect; 20be0a7e9fSMehdi Amini } // namespace arith 21a54f4eaeSMogball 22c30ab6c2SEugene Zhulenev namespace async { 23c30ab6c2SEugene Zhulenev class AsyncDialect; 24c30ab6c2SEugene Zhulenev } // namespace async 25c30ab6c2SEugene Zhulenev 26c30ab6c2SEugene Zhulenev namespace scf { 27c30ab6c2SEugene Zhulenev class SCFDialect; 28c30ab6c2SEugene Zhulenev } // namespace scf 29c30ab6c2SEugene Zhulenev 30b537c5b4SEugene Zhulenev // -------------------------------------------------------------------------- // 31b537c5b4SEugene Zhulenev // Utility functions shared by Async Transformations. 32b537c5b4SEugene Zhulenev // -------------------------------------------------------------------------- // 33b537c5b4SEugene Zhulenev 34b537c5b4SEugene Zhulenev // Forward declarations. 35b537c5b4SEugene Zhulenev class OpBuilder; 36b537c5b4SEugene Zhulenev 37b537c5b4SEugene Zhulenev namespace async { 38b537c5b4SEugene Zhulenev 39b537c5b4SEugene Zhulenev /// Clone ConstantLike operations that are defined above the given region and 40b537c5b4SEugene Zhulenev /// have users in the region into the region entry block. We do that to reduce 41b537c5b4SEugene Zhulenev /// the number of function arguments when we outline `async.execute` and 42b537c5b4SEugene Zhulenev /// `scf.parallel` operations body into functions. 43b537c5b4SEugene Zhulenev void cloneConstantsIntoTheRegion(Region ®ion); 44b537c5b4SEugene Zhulenev void cloneConstantsIntoTheRegion(Region ®ion, OpBuilder &builder); 45b537c5b4SEugene Zhulenev 46b537c5b4SEugene Zhulenev } // namespace async 47b537c5b4SEugene Zhulenev 48c30ab6c2SEugene Zhulenev } // namespace mlir 49c30ab6c2SEugene Zhulenev 50c30ab6c2SEugene Zhulenev #endif // DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_ 51