Autogenerated documentation for DRR patterns?

Is there a means to autogenerate markdown docs for patterns defined in DRR tablegen? The main motivation for this is to document the canonicalization patterns on the dialect documentation page (out of tree), say, by appending a section about canonicalization patterns.

Even better would be to have this documentation attached to the op docs, but as I understand it this would not be feasible based on how the canonicalization rules are attached to the ops in C++.

1 Like

No, but it was one of the open projects listed at one point. One could go the direct route of just including the DAG, I think the graph of the before and after tree would be nicer (and I could have sworn someone made something there). I think it can be done simply, I mean making it great another story :slight_smile:

I think it’s fine to attach where known. Why not? For the others some trick could be done to include something at some point. But we don’t have to go for lowest common denominator. If something usable, display it.