xlauko wrote:

> > What about changing the format non-ambiguous parse that does not need 
> > lookahead, i.e. dropping commas:
> > ```
> >   let assemblyFormat = [{
> >     $allocaType `,` qualified(type($addr)) `,`
> >     ($dynAllocSize^ `:` type($dynAllocSize) `,`)?
> >     `[` $name
> >         oilist( `init`              $init
> >               | `const`             $constant
> >               | `cleanup_dest_slot` $cleanup_dest_slot )
> >     `]`
> >     ($annotations^)? attr-dict
> >   }];
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > or adding `comma-separated-oilist` to mlir tablegen?
> 
> yes that works, i did it this way because i wanted to maintain the current 
> format and avoid changing all the test cases 😅 since dropping the comma would 
> break them, but if you prefer the oilist approach i can change it.

Yeah I got it, and if we are to change format we can make it a bit more uniform 
with other operations. It is a weird that alloca has some attributes in 
surrounded by `[` `]`. Not sure what would be the best here. @andykaylor 
@erichkeane would you have a preference or do we want to keep old format and 
custom printer/parser?

https://github.com/llvm/llvm-project/pull/198962
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to