mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 11:23:52 +00:00
![Lei Zhang](/assets/img/avatar_default.png)
With this, now we can specify a list of attributes on named ops generated from the spec. The format is defined as ``` attr-id ::= bare-id (`?`)? attr-typedef ::= type (`[` `]`)? attr-def ::= attr-id `:` attr-typedef tc-attr-def ::= `attr` `(` attr-def-list `)` tc-def ::= `def` bare-id `(`tensor-def-list`)` `->` `(` tensor-def-list`)` (tc-attr-def)? ``` For example, ``` ods_def<SomeCppOp> def some_op(...) -> (...) attr( f32_attr: f32, i32_attr: i32, array_attr : f32[], optional_attr? : f32 ) ``` where `?` means optional attribute and `[]` means array type. Reviewed By: hanchung, nicolasvasilache Differential Revision: https://reviews.llvm.org/D94240
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.