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

dialects: (cf) cond_br folding #3283

Merged
merged 2 commits into from
Oct 10, 2024
Merged

Conversation

alexarice
Copy link
Collaborator

First two cond_br canonicalization patterns:

  • Constant folding (cf.cond_br %true ^0 ^1 == cf.br ^0)
  • Passthrough (conditional branch to a branch with just a single br op gets forwarded)

@alexarice alexarice added dialects Changes on the dialects transformations Changes or adds a transformatio labels Oct 10, 2024
@alexarice alexarice self-assigned this Oct 10, 2024
@@ -9,6 +9,7 @@
op_type_rewrite_pattern,
)
from xdsl.rewriter import InsertPoint
from xdsl.transforms.canonicalization_patterns.scf import const_evaluate_operand
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should this be moved somewhere else, and if so where?

Copy link
Member

Choose a reason for hiding this comment

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

xdsl.transforms.canonicalization_patterns.utils? Can then be moved up as needed

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.99%. Comparing base (b5fbbbf) to head (09adfb3).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3283   +/-   ##
=======================================
  Coverage   89.98%   89.99%           
=======================================
  Files         444      445    +1     
  Lines       55639    55719   +80     
  Branches     5354     5367   +13     
=======================================
+ Hits        50068    50142   +74     
+ Misses       4174     4171    -3     
- Partials     1397     1406    +9     

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

@alexarice alexarice merged commit 7f0f3e6 into main Oct 10, 2024
14 checks passed
@alexarice alexarice deleted the alexarice/cond_br_canonicalize branch October 10, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants