[RFC] DSL-style / dialect-specific builders

What would happen if there are multiple derived projects that want to share a style? (Let’s say both TensorFlow and PyTorch users of MLIR want EDSC, for example). At which point something becomes “core enough” to warrant inclusion upstream?

Generally, do you expect a lot of API pattern / concept reuse between LLVM and MLIR?

I do agree that this proposal moves several design decisions at once, yet it also feels incremental compared to what we may be able to implement. Evolving API as core as builder also has costs, and almost everybody will have to pay them, so I am trying to balance the scope of the proposal and the number of different improvements we need to discuss.

Can we maybe have a list of design issues that we think are worth discussing separately? Location handling is one and doc/autocomplete is the other. Naming scheme? Anything else? (Also note that this thread is already split out of a larger thread).

The usual suspects in C++ are template instantiation and heavy overload resolution. Builder API uses both… But you are right that we should consider the compilation time as a cost metric.

Thanks!