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: (riscv) Refactor register allocaton strategies #1266

Merged
merged 13 commits into from Jul 14, 2023

Conversation

compor
Copy link
Collaborator

@compor compor commented Jul 13, 2023

This PR:

  • Refactors all current allocation strategies:
    • Adds the is_allocated helper method/property to the register types (factored out from one of the strategies)
    • Regularizes the use of integer and float register sets (RegisterType/FloatRegisterType) across all strategies
    • Shortens a test case to expose the use of Riscemu infinite registers

@compor compor added the dialects Changes on the dialects label Jul 13, 2023
@compor compor requested a review from adutilleul July 13, 2023 06:56
@compor compor self-assigned this Jul 13, 2023
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Patch coverage: 91.11% and project coverage change: +0.03 🎉

Comparison is base (2423d28) 89.12% compared to head (bd9a589) 89.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1266      +/-   ##
==========================================
+ Coverage   89.12%   89.16%   +0.03%     
==========================================
  Files         181      181              
  Lines       24073    24069       -4     
  Branches     3667     3657      -10     
==========================================
+ Hits        21455    21460       +5     
+ Misses       2040     2037       -3     
+ Partials      578      572       -6     
Impacted Files Coverage Δ
xdsl/backend/riscv/register_allocation.py 91.20% <90.62%> (+7.55%) ⬆️
xdsl/dialects/riscv.py 83.76% <92.30%> (+0.16%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

xdsl/dialects/riscv.py Outdated Show resolved Hide resolved
Copy link
Member

@superlopuh superlopuh left a comment

Choose a reason for hiding this comment

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

some small comments, otherwise LGTM

@compor compor requested a review from superlopuh July 14, 2023 07:55
@compor compor merged commit c2562b6 into main Jul 14, 2023
10 checks passed
@compor compor deleted the christos/riscv/alloc-helper-method branch July 14, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants