[PATCH] D127471: [Coroutines] Convert coroutine.presplit to enum attr
ezhulenev accepted this revision. ezhulenev added a comment. This revision is now accepted and ready to land. Yes, that's the correct MLIR way of passing attributes to LLVM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127471/new/ https://reviews.llvm.org/D127471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D115790: [Coroutines] Set presplit attribute in Clang
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` 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
[PATCH] D115790: [Coroutines] Set presplit attribute in Clang and mlir
ezhulenev accepted this revision. ezhulenev added inline comments. Comment at: mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp:201 + StringAttr::get(ctx, "0")})})); + CoroMachinery machinery; nit: builder has an API to simplify attributes construction: https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/IR/Builders.h#L92-L100 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