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: Honour safe erase in rewriter.earse_op #1241

Merged
merged 6 commits into from Jul 7, 2023
Merged

core: Honour safe erase in rewriter.earse_op #1241

merged 6 commits into from Jul 7, 2023

Conversation

kingiler
Copy link
Collaborator

@kingiler kingiler commented Jul 6, 2023

Address #1128

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (adfc0ef) 88.93% compared to head (9415d06) 88.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1241      +/-   ##
==========================================
+ Coverage   88.93%   88.94%   +0.01%     
==========================================
  Files         175      175              
  Lines       23642    23657      +15     
  Branches     3587     3588       +1     
==========================================
+ Hits        21026    21042      +16     
+ Misses       2044     2043       -1     
  Partials      572      572              
Impacted Files Coverage Δ
tests/test_rewriter.py 100.00% <100.00%> (ø)
xdsl/pattern_rewriter.py 73.40% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@AntonLydike AntonLydike left a comment

Choose a reason for hiding this comment

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

Thanks for this! Could you add a regression test for this? Maybe the example from the issue itself? It's always good to add testcases that were missed previously!

@AntonLydike AntonLydike added the bug Something isn't working label Jul 6, 2023
@kingiler kingiler changed the title Honour safe erase in rewriter.earse_op core: Honour safe erase in rewriter.earse_op Jul 6, 2023
@kingiler kingiler added minor For minor PRs, easy and quick to review, quickly mergeable core xDSL core (ir, textual format, ...) labels Jul 6, 2023
Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Yes perfect, can you write a test that was failing before but working now?

@kingiler
Copy link
Collaborator Author

kingiler commented Jul 7, 2023

I am asking the one who create the issue for a MWE. Or anyone can come up with a MWE as I personally do not come into this problem before.

@math-fehr
Copy link
Collaborator

In a program like:

%0 = "test.op"() : () -> i32
%1 = "test.op"(%0) : (i32) -> ()

Removing the first operation with "safe_erase=False" should fail on the previous commit, but succeed after this one.

@kingiler
Copy link
Collaborator Author

kingiler commented Jul 7, 2023

@math-fehr @AntonLydike , test case added, should be okay?

tests/test_rewriter.py Outdated Show resolved Hide resolved
@kingiler kingiler merged commit 61178cb into main Jul 7, 2023
10 checks passed
@kingiler kingiler deleted the safe_erase branch July 7, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core xDSL core (ir, textual format, ...) minor For minor PRs, easy and quick to review, quickly mergeable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants