1//===- AsyncDialect.td -------------------------------------*- tablegen -*-===// 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// Async dialect definition. 10// 11//===----------------------------------------------------------------------===// 12 13#ifndef ASYNC_DIALECT_TD 14#define ASYNC_DIALECT_TD 15 16include "mlir/IR/OpBase.td" 17 18//===----------------------------------------------------------------------===// 19// Async dialect definitions 20//===----------------------------------------------------------------------===// 21 22def AsyncDialect : Dialect { 23 let name = "async"; 24 let cppNamespace = "::mlir::async"; 25 26 let summary = "Types and operations for async dialect"; 27 let description = [{ 28 This dialect contains operations for modeling asynchronous execution. 29 }]; 30 31 let useDefaultTypePrinterParser = 1; 32 33 let extraClassDeclaration = [{ 34 /// The name of a unit attribute on funcs that are allowed to have a 35 /// blocking async.runtime.await ops. Only useful in combination with 36 /// 'eliminate-blocking-await-ops' option, which in absence of this 37 /// attribute might convert a func to a coroutine. 38 static constexpr StringRef kAllowedToBlockAttrName = 39 "async.allowed_to_block"; 40 }]; 41 42 // TODO: Prefixed form overlaps with generated names, update before flipping. 43 let emitAccessorPrefix = kEmitAccessorPrefix_Raw; 44} 45 46#endif // ASYNC_DIALECT_TD 47