MLIR  14.0.0git
Async.h
Go to the documentation of this file.
1 //===- Async.h - MLIR Async dialect -----------------------------*- 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 // This file defines the async dialect that is used for modeling asynchronous
10 // execution.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_DIALECT_ASYNC_IR_ASYNC_H
15 #define MLIR_DIALECT_ASYNC_IR_ASYNC_H
16 
18 #include "mlir/IR/Builders.h"
19 #include "mlir/IR/BuiltinTypes.h"
20 #include "mlir/IR/Dialect.h"
21 #include "mlir/IR/OpDefinition.h"
23 #include "mlir/IR/PatternMatch.h"
26 
27 //===----------------------------------------------------------------------===//
28 // Async Dialect
29 //===----------------------------------------------------------------------===//
30 
31 #include "mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc"
32 
33 //===----------------------------------------------------------------------===//
34 // Async Dialect Operations
35 //===----------------------------------------------------------------------===//
36 
37 #define GET_OP_CLASSES
38 #include "mlir/Dialect/Async/IR/AsyncOps.h.inc"
39 
40 //===----------------------------------------------------------------------===//
41 // Helper functions of Async dialect transformations.
42 //===----------------------------------------------------------------------===//
43 
44 namespace mlir {
45 namespace async {
46 
47 /// Returns true if the type is reference counted at runtime.
48 inline bool isRefCounted(Type type) {
49  return type.isa<TokenType, ValueType, GroupType>();
50 }
51 
52 } // namespace async
53 } // namespace mlir
54 
55 #endif // MLIR_DIALECT_ASYNC_IR_ASYNC_H
Include the generated interface declarations.
bool isRefCounted(Type type)
Returns true if the type is reference counted at runtime.
Definition: Async.h:48
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition: Types.h:72
bool isa() const
Definition: Types.h:234