Skip to content

Commit 22ac2cb

Browse files
author
Aviad Cohen
committed
[mlir][async]: Make async.execute operation pure
1 parent 7c010bf commit 22ac2cb

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

mlir/include/mlir/Dialect/Async/IR/AsyncOps.td

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def Async_ExecuteOp :
3838
["getEntrySuccessorOperands",
3939
"areTypesCompatible"]>,
4040
AttrSizedOperandSegments,
41-
AutomaticAllocationScope]> {
41+
AutomaticAllocationScope,
42+
Pure]> {
4243
let summary = "Asynchronous execute operation";
4344
let description = [{
4445
The `body` region attached to the `async.execute` operation semantically
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: mlir-opt %s -split-input-file -canonicalize | FileCheck %s
2+
3+
// CHECK-NOT: async.execute
4+
5+
func.func @empty_execute() {
6+
%token = async.execute {
7+
async.yield
8+
}
9+
return
10+
}

0 commit comments

Comments
 (0)