Historically, custom builder specification in OpBuilder has been accepting the
formal parameter list for the builder method as a raw string containing C++.
While this worked well to connect the signature and the body, this became
problematic when ODS needs to manipulate the parameter list, e.g. to inject
OpBuilder or to trim default values when generating the definition. This has
also become inconsistent with other method declarations, in particular in
interface definitions.
Introduce the possibility to define OpBuilder formal parameters using a
TableGen dag similarly to other methods. Additionally, introduce a mechanism to
declare parameters with default values using an additional class. This
mechanism can be reused in other methods. The string-based builder signature
declaration is deprecated and will be removed after a transition period.
This is really cool functionality, I think this is a big step up over the string based thing.
I'd suggest a slightly different approach to this writing - few people know that the (x thing:$foo) syntax is a tablegen "dag" and the writing may come across as scary for people who don't know this stuff.
I'd suggest you keep the first paragraph, then go into the example. Start with a simple example without default arguments (maybe a convenience constructor that takes an integer for the float attr or something), then show that you can add a default argument to it.
This allows you to build the tower of complexity, and explain (in english prose) the concepts as you introduce them.
Thank you for working on this!