51 lines · c
1//===- PassDetail.h - Async Pass class details ------------------*- 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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_10#define DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_11 12#include "mlir/IR/BuiltinOps.h"13#include "mlir/IR/Dialect.h"14#include "mlir/Pass/Pass.h"15 16namespace mlir {17 18namespace arith {19class ArithDialect;20} // namespace arith21 22namespace async {23class AsyncDialect;24} // namespace async25 26namespace scf {27class SCFDialect;28} // namespace scf29 30// -------------------------------------------------------------------------- //31// Utility functions shared by Async Transformations.32// -------------------------------------------------------------------------- //33 34// Forward declarations.35class OpBuilder;36 37namespace async {38 39/// Clone ConstantLike operations that are defined above the given region and40/// have users in the region into the region entry block. We do that to reduce41/// the number of function arguments when we outline `async.execute` and42/// `scf.parallel` operations body into functions.43void cloneConstantsIntoTheRegion(Region ®ion);44void cloneConstantsIntoTheRegion(Region ®ion, OpBuilder &builder);45 46} // namespace async47 48} // namespace mlir49 50#endif // DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_51