vaivaswatha / pliron

Programming Languages Intermediate Representation
Apache License 2.0
87 stars 6 forks source link

Support for TableGen #42

Open erichulburd opened 3 weeks ago

erichulburd commented 3 weeks ago

Interesting and ambitious project! Do you have any driving use cases for this? Or is currently a side project?

I didn't see mention of this in the Wiki or Issues, but I'd be curious if it's worth considering support for generating Rust code based on TableGen (or its JSON form). I realize TableGen supports C++ definitions as strings, so there obviously won't be complete compatibility, but it might provide (a) some design compatibility and (b) partial support for some MLIR-based dialects.

vaivaswatha commented 3 weeks ago

I don't have a driving use-case, but I am working on making it demonstrable as a generally useful infrastructure. The Fibonacci example with the LLVM dialect is a step in that direction.

but I'd be curious if it's worth considering support for generating Rust code based on TableGen

I do want support for declarative specification of operations, types etc. My first plan for that is to use (the versatile and powerful) Rust macros. Look at #19 and #20 for a glimpse of what I mean (but note that they're both very outdated). The author there has abandoned the work, but I am in the process of taking it up.

Regarding TableGen itself, I probably will not work on it myself in the near future, but if someone helps / contributes it, it would be wonderful. Probably the best way for that is to make it a standalone tool (outside the pliron repo) that I can cite in the pliron repo. It could be within the pliron repo too (whatever is best).

erichulburd commented 3 weeks ago

Very good. If you have 15-30 minutes to chat some time in the next couple of weeks, look out from an email from me at your GIthub listed email address. I'd like to get a high level overview of where things stand, what sort of contributions would be most useful, and what a realistic roadmap looks like from your POV.