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/riscv: Add liveness block naive register allocation strategy #1220
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1220 +/- ##
==========================================
- Coverage 88.94% 88.93% -0.01%
==========================================
Files 175 175
Lines 23590 23642 +52
Branches 3568 3587 +19
==========================================
+ Hits 20981 21026 +45
- Misses 2042 2044 +2
- Partials 567 572 +5
☔ View full report in Codecov by Sentry. |
6f5d6e1
to
c694fd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I feel that more code could be shared amongst all strategies, like for instance having a proper abstraction for a RegisterSet
; an helper like walk_blocks
would also make the code easier to read but this should be done in other PRs.
I agree, but not for this PR ;) I'm glad that this makes it obvious though! |
This PR adds a liveness use-def register allocation strategy that works on blocks.
It traverses the use-def SSA chain backwards (i.e., from uses to defs) and