You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be awesome if llvm-dialects could use the tablegen definitions to generate a C-API automatically.
But how to do so is probably worth some discussion.
It'd probably end up in a state similar to the LLVM C API where sometimes: the C API is strictly a wrapper around the C++ API and some features may not immediately be available in the C API.
I could imagine this working as a second set of llvm-dialects-tblgen actions: one to generate an .inc file for a C header, and one to generate an .inc file for a C++ source that implements the functions exposed by the C header by referring back to the C++ functions.
Layering it in this way ensures that the two APIs agree about how operands are represented etc.
Not sure about the enums...
In terms of project management: We (AMD) have no use for it, but I'd be happy to accept such a feature as long as it has testing that's roughly comparable with what's there for the C++ API.
It would be awesome if
llvm-dialects
could use the tablegen definitions to generate a C-API automatically.But how to do so is probably worth some discussion.
As an example this is the current IRBuilder API:
https://github.com/llvm/llvm-project/blob/7fe29e585723c8a90e798b3d852f2c54efb6f5dd/llvm/include/llvm-c/Core.h#L3742-L3753
But there are also delightful enums like: https://github.com/llvm/llvm-project/blob/7fe29e585723c8a90e798b3d852f2c54efb6f5dd/llvm/include/llvm-c/Core.h#L60
The text was updated successfully, but these errors were encountered: