Page MenuHomePhabricator

[mlir][DeclarativeParser] Add an 'attr-dict-with-keyword' directive

Authored by rriddle on Feb 15 2020, 11:24 PM.



This matches the '(print|parse)OptionalAttrDictWithKeyword' functionality provided by the assembly parser/printer.

Depends On D74681

Diff Detail

Event Timeline

rriddle created this revision.Feb 15 2020, 11:24 PM
jpienaar added inline comments.Feb 18 2020, 2:41 PM

I'm not sure I follow this, so attributes is just some string? Why do we need to treat attributes special vs just have "attributes attr-dic" ?

rriddle marked an inline comment as done.Feb 18 2020, 2:46 PM
rriddle added inline comments.

We do this because the attributes keyword is optionally printed in the same context as the dictionary. The OpAsmPrinter gained support a while ago to do this to allow differentiation between region and attribute dictionaries.

rriddle marked an inline comment as done.Feb 18 2020, 4:46 PM
jpienaar accepted this revision.Feb 21 2020, 9:55 AM

LGTM, Seems a bit too specialized but OK matches current behavior and not too invasive.

This revision is now accepted and ready to land.Feb 21 2020, 9:55 AM
antiagainst accepted this revision.Feb 21 2020, 12:21 PM
antiagainst added inline comments.

Nit: explicit?

rriddle updated this revision to Diff 245973.Feb 21 2020, 1:11 PM
rriddle marked an inline comment as done.

Resolve comments.

This revision was automatically updated to reflect the committed changes.