Skip to content

[WIP] optimize x86_scf loop lowering when bounds and step are static - #6291

Draft
superlopuh wants to merge 7 commits into
mainfrom
sasha/libxsmm-experiments-merge
Draft

[WIP] optimize x86_scf loop lowering when bounds and step are static#6291
superlopuh wants to merge 7 commits into
mainfrom
sasha/libxsmm-experiments-merge

Conversation

@superlopuh

Copy link
Copy Markdown
Member

This is the tracking PR for all the changes needed to optimise loops like libxsmm does. I'm currently not 100% happy with them, but the bottom of the stack is ready to merge IMO. Here are some remaining steps:

  1. add regalloc legalization pass
  2. one of the commits in the stack inserts a move if lb is used more than once, but this should be done by the legalization pass in step 1
  3. add a new result to the loop operation that returns the final state of lb at the end of the loop. If the bounds are known, then the original state of lb can be recovered, and then that value can be used again without saving that value somewhere, increasing the register pressure.

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.02%. Comparing base (39bc275) to head (6af506a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
xdsl/transforms/convert_x86_scf_to_x86.py 92.85% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6291   +/-   ##
=======================================
  Coverage   87.01%   87.02%           
=======================================
  Files         431      431           
  Lines       65015    65013    -2     
  Branches     7453     7452    -1     
=======================================
  Hits        56576    56576           
+ Misses       6866     6862    -4     
- Partials     1573     1575    +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@superlopuh
superlopuh force-pushed the sasha/libxsmm-experiments-merge branch from 9f7dbee to 39faac1 Compare July 25, 2026 11:31
@superlopuh
superlopuh force-pushed the sasha/libxsmm-experiments-merge branch from 39faac1 to 6af506a Compare July 26, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant