-
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
dialects: (ptr) Introducing ptr dialect #3380
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3380 +/- ##
==========================================
+ Coverage 90.10% 90.13% +0.02%
==========================================
Files 450 451 +1
Lines 56796 56868 +72
Branches 5459 5459
==========================================
+ Hits 51178 51256 +78
+ Misses 4176 4167 -9
- Partials 1442 1445 +3 ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,20 @@ | |||
// RUN: xdsl-opt %s --parsing-diagnostics --verify-diagnostics --split-input-file | filecheck %s | |||
|
|||
builtin.module { |
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.
builtin.module { |
xdsl/dialects/ptr.py
Outdated
elem_type = prop_def(base(Attribute)) | ||
offset = result_def(AnyOf([IntegerType, IndexType])) |
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)) | |
offset = result_def(AnyOf([IntegerType, IndexType])) | |
elem_type = prop_def() | |
offset = result_def(IntegerAttrTypeConstr) |
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.
prop_def
complains that it needs a constraint parameter
xdsl/dialects/ptr.py
Outdated
class TypeOffsetOp(IRDLOperation): | ||
name = "ptr_xdsl.type_offset" | ||
|
||
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(Attribute) |
You're right, I didn't realise that prop_def
needed a constraint. Also AnyAttr()
would work here.
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.
LGTM modulo base(Attribute)
Porting the ptr dialect proposed [here](https://discourse.llvm.org/t/rfc-ptr-dialect-modularizing-ptr-ops-in-the-llvm-dialect/75142/21). Going to transfer the riscv compilation pipeline to it.
Porting the ptr dialect proposed here. Going to transfer the riscv compilation pipeline to it.