This patch attempts to add the oilist primitive proposed in the RFC: Extending Declarative Assembly Format to support order-independent variadic segments.
This element supports optional order-independent variadic segments for operations. This will allow OpenACC and OpenMP Dialects to have similar and relaxed requirements while encouraging the use of Declarative Assembly Format and avoiding code duplication.
An oilist element parses grammar of the form:
clause-list := clause clause-list | empty clause := `keyword` clause1 | `otherKeyword` clause2 clause1 := <assembly-format element> clause2 := <assembly-format element>
AssemblyFormat specification:
let assemblyFormat = [{ oilist( `keyword` clause1 | `otherkeyword` clause2 ... ) }];
Example:
oilist( `private` `(` $arg0 `:` type($arg0) `)` | `nowait` | `reduction` custom<ReductionClause>($arg1, type($arg1))) oilist( `private` `=` $arg0 `:` type($arg0) | `reduction` `=` $arg1 `:` type($arg1) | `firstprivate` `=` $arg3 `:` type($arg2))
Can you add an op to the test dialect that uses this new directive and then add some list tests to test round-tripping the new format?