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

core: Simplify the pattern rewriter #1910

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

math-fehr
Copy link
Collaborator

Now that the pattern rewriter use the worklist, it is not necessary to keep track of the inserted operations before/after
the matched operation.
We can thus remove all these checks.

@math-fehr math-fehr added the core xDSL core (ir, textual format, ...) label Dec 22, 2023
@math-fehr math-fehr self-assigned this Dec 22, 2023
@math-fehr math-fehr changed the base branch from main to fehr/new-walker-with-worklist December 22, 2023 15:04
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e6ca26f) 89.94% compared to head (21a2af8) 89.99%.

Files Patch % Lines
xdsl/pattern_rewriter.py 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1910      +/-   ##
==========================================
+ Coverage   89.94%   89.99%   +0.05%     
==========================================
  Files         287      287              
  Lines       35779    35664     -115     
  Branches     5266     5242      -24     
==========================================
- Hits        32181    32097      -84     
+ Misses       2838     2816      -22     
+ Partials      760      751       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@math-fehr math-fehr force-pushed the fehr/new-walker-with-worklist branch from 6776572 to 3afbc2d Compare December 22, 2023 23:45
@math-fehr math-fehr force-pushed the fehr/simplify-pattern-rewriter branch from e02f606 to 06ae319 Compare December 22, 2023 23:54
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.

beautiful

@math-fehr math-fehr force-pushed the fehr/new-walker-with-worklist branch from ba38908 to c10b00c Compare December 27, 2023 13:00
@webmiche
Copy link
Collaborator

webmiche commented Jan 3, 2024

Could you rebase this? I think that would make it more reviewable :)

@math-fehr math-fehr force-pushed the fehr/simplify-pattern-rewriter branch from 06ae319 to 92e0687 Compare January 4, 2024 02:20
Copy link
Collaborator

@webmiche webmiche left a comment

Choose a reason for hiding this comment

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

Now that actually looks like a simplification 😉

I still wonder if no downstream users are affected (in particular in the Chocopy world), but if we can make sure it's fine, I think this is a good change 👍

@math-fehr math-fehr force-pushed the fehr/new-walker-with-worklist branch from b234f14 to 45140fc Compare January 22, 2024 02:32
Base automatically changed from fehr/new-walker-with-worklist to main January 22, 2024 02:36
@math-fehr math-fehr force-pushed the fehr/simplify-pattern-rewriter branch from 92e0687 to 21a2af8 Compare January 22, 2024 02:47
@math-fehr math-fehr merged commit 5248ab0 into main Jan 22, 2024
10 checks passed
@math-fehr math-fehr deleted the fehr/simplify-pattern-rewriter branch January 22, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants