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

transforms: (canonicalize) Add full dce #3267

Merged
merged 3 commits into from
Oct 10, 2024
Merged

Conversation

alexarice
Copy link
Collaborator

  • Adds ability to specify arbitrary action after processing the worklist in the rewriter
  • Canonicalize now adds full dce passes between applying rounds of canonicalization patterns
  • Lets the full dce algorithm emit listener events (I'm not sure if this was necessary)
  • Updates riscv canonicalization test that now gets more aggressively simplified
  • Adds cf filecheck test demonstrating the effect of this change

@alexarice alexarice added core xDSL core (ir, textual format, ...) transformations Changes or adds a transformatio labels Oct 9, 2024
@alexarice alexarice self-assigned this Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.98%. Comparing base (223cdb3) to head (01a2540).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3267      +/-   ##
==========================================
+ Coverage   89.93%   89.98%   +0.04%     
==========================================
  Files         443      444       +1     
  Lines       55569    55628      +59     
  Branches     8678     5352    -3326     
==========================================
+ Hits        49977    50057      +80     
- Misses       4162     4174      +12     
+ Partials     1430     1397      -33     

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

Copy link
Member

Choose a reason for hiding this comment

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

nice

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just saw this deleted the first riscv.label as it appears in a dead block. Is this acceptable?

Copy link
Member

Choose a reason for hiding this comment

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

Yep! The only label we care about is the one at the start of the block we jump to

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.

Nice!
I'm just proposing a different name, but otherwise good for me ✅

xdsl/pattern_rewriter.py Outdated Show resolved Hide resolved
xdsl/pattern_rewriter.py Outdated Show resolved Hide resolved
xdsl/pattern_rewriter.py Outdated Show resolved Hide resolved
xdsl/pattern_rewriter.py Outdated Show resolved Hide resolved
xdsl/transforms/canonicalize.py Outdated Show resolved Hide resolved
@alexarice alexarice merged commit ff389e4 into main Oct 10, 2024
14 checks passed
@alexarice alexarice deleted the alexarice/canon-dce-full branch October 10, 2024 09:32
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, ...) transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants