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-exception
6//
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 arith
21
22namespace async {
23class AsyncDialect;
24} // namespace async
25
26namespace scf {
27class SCFDialect;
28} // namespace scf
29
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 and
40/// have users in the region into the region entry block. We do that to reduce
41/// the number of function arguments when we outline `async.execute` and
42/// `scf.parallel` operations body into functions.
43void cloneConstantsIntoTheRegion(Region &region);
44void cloneConstantsIntoTheRegion(Region &region, OpBuilder &builder);
45
46} // namespace async
47
48} // namespace mlir
49
50#endif // DIALECT_ASYNC_TRANSFORMS_PASSDETAIL_H_
51

source code of mlir/lib/Dialect/Async/Transforms/PassDetail.h