ezhulenev added a subscriber: mehdi_amini.
ezhulenev added a comment.

There are two places where in MLIR you can put an attribute to coroutine 
functions:

1. 
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp#L126

This is the point when coroutine functions are created, and you can attach 
attribute to the `func` argument

2. 
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp#L325

Another options is to attach attribute to the `op->getParentOfType<FuncOp>` 
when async runtime operations lowered to `coro.id` intrinsic.

/cc @mehdi_amini to chime in what option is better. I'm not sure though what 
type of MLIR attribute will be translated to LLVM `"coroutine.presplit"="0"`, 
`UnitAttr`? Or it must be `IntegerAttr`.

I'm on vacation with limjted access to computer until the end of the year, I 
can take a look at it myself ~late Dec or early Jan.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115790/new/

https://reviews.llvm.org/D115790

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to