-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: Add attributes to func outputs #3661
core: Add attributes to func outputs #3661
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3661 +/- ##
==========================================
+ Coverage 90.73% 91.29% +0.56%
==========================================
Files 467 466 -1
Lines 58965 58327 -638
Branches 5640 5638 -2
==========================================
- Hits 53500 53248 -252
+ Misses 4020 3629 -391
- Partials 1445 1450 +5 ☔ View full report in Codecov by Sentry. |
// CHECK: func.func @output_attributes() -> (f32 {"a" = 0 : i32}, f32 {"b" = 0 : i32, "c" = 1 : i64}) { | ||
// CHECK-NEXT: %r1, %r2 = "test.op"() : () -> (f32, f32) | ||
// CHECK-NEXT: func.return %r1, %r2 : f32, f32 | ||
// CHECK-NEXT: } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a generic format filecheck and an mlir integration filecheck for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Done.
xdsl/dialects/riscv_func.py
Outdated
(name, input_types, return_types, region, extra_attrs, arg_attrs, _) = ( | ||
parse_func_op_like( | ||
parser, | ||
reserved_attr_names=("sym_name", "function_type", "sym_visibility"), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please raise NotImplementedError if there are any res_attrs here and in other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Mlir supports attributes for output types. We need for cross compatibility with other mlir projects.