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

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 14:47:00 PST 2020


rriddle marked an inline comment as done.
rriddle added inline comments.


================
Comment at: mlir/docs/OpDefinitions.md:593
+    -   Represents the attribute dictionary of the operation, but prefixes the
+        dictionary with an `attributes` keyword.
 
----------------
jpienaar wrote:
> 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" ?
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74682/new/

https://reviews.llvm.org/D74682





More information about the llvm-commits mailing list