Skip to content
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

Merged
merged 4 commits into from
Nov 2, 2024

Conversation

mamanain
Copy link
Collaborator

@mamanain mamanain commented Nov 1, 2024

Porting the ptr dialect proposed here. Going to transfer the riscv compilation pipeline to it.

@mamanain mamanain self-assigned this Nov 1, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.13%. Comparing base (53cd520) to head (27d104a).
Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@@ -0,0 +1,20 @@
// RUN: xdsl-opt %s --parsing-diagnostics --verify-diagnostics --split-input-file | filecheck %s

builtin.module {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
builtin.module {

xdsl/dialects/ptr.py Outdated Show resolved Hide resolved
Comment on lines 48 to 49
elem_type = prop_def(base(Attribute))
offset = result_def(AnyOf([IntegerType, IndexType]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elem_type = prop_def(base(Attribute))
offset = result_def(AnyOf([IntegerType, IndexType]))
elem_type = prop_def()
offset = result_def(IntegerAttrTypeConstr)

Copy link
Collaborator Author

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 Show resolved Hide resolved
class TypeOffsetOp(IRDLOperation):
name = "ptr_xdsl.type_offset"

elem_type = prop_def(base(Attribute))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Member

@superlopuh superlopuh left a 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)

@mamanain mamanain merged commit 3b668fb into xdslproject:main Nov 2, 2024
14 checks passed
@mamanain mamanain deleted the ptr-dialect-part-1 branch November 2, 2024 23:11
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants