I have two ideas, which I’ve worked on in an out of tree project:
- Having descriptions for passes include references to lit tests as examples, which then get rendered at doc generation time by actually running them with a given pass and displaying the before/after (Add script to generate documentation examples from lit tests by j2kun · Pull Request #1987 · google/heir · GitHub)
- Defining pipelines (VERY in-progress draft Add pipeline definitions to mlir-tblgen by j2kun · Pull Request #9 · j2kun/llvm-project · GitHub ). Besides defining pipelines as a sequence of passes (or sub-pipelines), it could propagate options from the pipeline to each pass (which is a lot of boilerplate today) and move us toward a better ideal of exposing pipelines with more coherent before/after properties than is easy to do with individual passes. one-shot-bufferize seems like a good first candidate here, since currently one has to do it manually from this diagram (which results in code like this in every out-of-tree project that is probably wrong or stale because I don’t actually know much about the details of bufferization)