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

transformations: (pdl) Better support for pdl.type and pdl.replace #3402

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

qaco
Copy link
Collaborator

@qaco qaco commented Nov 5, 2024

No description provided.

@qaco qaco requested a review from superlopuh November 5, 2024 20:04
@qaco qaco self-assigned this Nov 5, 2024
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.17%. Comparing base (7f3957b) to head (66f0c6d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3402      +/-   ##
==========================================
+ Coverage   90.16%   90.17%   +0.01%     
==========================================
  Files         455      455              
  Lines       57332    57394      +62     
  Branches     5511     5530      +19     
==========================================
+ Hits        51692    51757      +65     
+ Misses       4186     4184       -2     
+ Partials     1454     1453       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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.

Could you please split this into three mini PRs, and add unit tests for them? The filecheck tests I find are generally less useful for debugging, as they don't pinpoint the exact point of failure. In this case, the error might be that the matcher doesn't match, and then we would still need to search in the code for where things went wrong. In contrast, unit tests hopefully cover the core parts of functionality for each function, and will help locate the bug immediately.

Comment on lines +112 to +116
if pdl_op.constantType is None or pdl_op.constantType == xdsl_attr:
self.matching_context[ssa_val] = xdsl_attr
return True
else:
return False
Copy link
Member

Choose a reason for hiding this comment

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

This is being added in #3405

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