This PR only has coro intrinsics needed for the Async to LLVM lowering. Will add other intrinsics as needed in the followup PRs.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Have you considered putting these in a separate dialect that just uses LLVMOpBase.td, similarly to what we have for NVVM or AVX512? My general take on it is that intrinsics listed in https://llvm.org/docs/LangRef.html#intrinsic-functions can stay in the "main" dialect, but "target-specific" intrinsics are better off in separate dialects. I understand there are pros and cons of doing this, so I won't block this commit only because of it.
mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td | ||
---|---|---|
98–109 | I'd rather do something like def LLVM_I8PointerType : LLVM_PointerTo<LLVM_i8>; and use it everywhere. Otherwise, this looks like there is an "opaque pointer" type different from "pointer to i8", which is not the case. |
Coro intrinsics are actually defined in the "main" LLVM intrinsic definition file, so I think it makes sense to keep them on LLVMOpBase:
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/Intrinsics.td#L1184
mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td | ||
---|---|---|
98–109 | Added a LLVM_i8Ptr constraint similar to simple LLVM_i8 |
I'd rather do something like def LLVM_I8PointerType : LLVM_PointerTo<LLVM_i8>; and use it everywhere. Otherwise, this looks like there is an "opaque pointer" type different from "pointer to i8", which is not the case.