-
Notifications
You must be signed in to change notification settings - Fork 74
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
[WIP]: Introducing ptr dialect and its riscv conversion #3350
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3350 +/- ##
==========================================
- Coverage 90.09% 90.07% -0.03%
==========================================
Files 447 450 +3
Lines 56494 56780 +286
Branches 5431 5447 +16
==========================================
+ Hits 50896 51142 +246
- Misses 4163 4196 +33
- Partials 1435 1442 +7 ☔ View full report in Codecov by Sentry. |
assembly_format = "$addr `,` $offset attr-dict `:` `(` type($addr) `,` type($offset) `)` `->` type($result)" | ||
|
||
|
||
# haven't managed to pass a type here yet. so did it with a hack. |
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.
The way that should work but is a bit inelegant is base(IntegerType) | base(IndexType)
, there might be IntegerTypeConstr
already defined, if not BaseAttr(IntegerType)
should also work
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.
I got it to work but only via passing the type through attributes. Is it possible to pass it as an operand? Xdsl complains that it expects an operand there if write "op"(i32)
@@ -34,7 +35,7 @@ class PtrAddOp(IRDLOperation): | |||
class TypeOffsetOp(IRDLOperation): | |||
name = "ptr.type_offset" | |||
|
|||
elem_type = prop_def(base(IntegerType)) | |||
elem_type = prop_def(base(Attribute)) |
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.
elem_type = prop_def(base(Attribute)) | |
elem_type = prop_def() |
Notebooks fail because I deleted Store and Load conversions from the MemrefToRiscv pass. Should we keep the old operation there or make the pass through pointers the default? |
Porting the
ptr
dialect proposed here. Transfering the riscv compilation to it forload
andstore
operations