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: (dce) region-level dce #3253

Merged
merged 3 commits into from
Oct 9, 2024
Merged

transforms: (dce) region-level dce #3253

merged 3 commits into from
Oct 9, 2024

Conversation

alexarice
Copy link
Collaborator

Introduces a region level algorithm for dead-code elimination, which is capable of deleting unused operations which occur in cycles and deleting blocks. It is modeled on the mlir implementation. While the mlir implementation separates this into two separate passes (removing dead blocks and then removing dead operations) they have a todo comment for merging them, and so I have implemented it here as a single pass.

I have not implemented removal of block argument removal, for the sake of keeping this PR smaller and my own sanity, as it seems to add a fair bit of complexity.

@alexarice alexarice added the transformations Changes or adds a transformatio label Oct 7, 2024
@alexarice alexarice self-assigned this Oct 7, 2024
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.93%. Comparing base (f6c5960) to head (a6c96d7).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3253      +/-   ##
==========================================
+ Coverage   89.92%   89.93%   +0.01%     
==========================================
  Files         441      442       +1     
  Lines       55417    55499      +82     
  Branches     8643     8665      +22     
==========================================
+ Hits        49832    49913      +81     
- Misses       4158     4159       +1     
  Partials     1427     1427              

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

Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
@alexarice alexarice merged commit 223cdb3 into main Oct 9, 2024
14 checks passed
@alexarice alexarice deleted the alexarice/region-dce branch October 9, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants