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) split out the base classes for custom format and assembly printing #3436

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

superlopuh
Copy link
Member

We currently have a single base class for two kinds of shared functionality: printing the assembly for the target, and printing the custom format. I'd like to decouple them to migrate some RISC-V operations to custom format, which cannot be provided at the same time as custom printing and parsing functions.

@superlopuh superlopuh added the dialects Changes on the dialects label Nov 13, 2024
@superlopuh superlopuh self-assigned this Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.19%. Comparing base (e08a8fc) to head (9412e4d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3436   +/-   ##
=======================================
  Coverage   90.19%   90.19%           
=======================================
  Files         458      458           
  Lines       57716    57717    +1     
  Branches     5564     5564           
=======================================
+ Hits        52059    52060    +1     
  Misses       4194     4194           
  Partials     1463     1463           

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

@@ -361,6 +361,12 @@ def get_register_constraints(self) -> RegisterConstraints:
def assembly_line(self) -> str | None:
raise NotImplementedError()


class RISCVCustomFormatOperation(RISCVAsmOperation, ABC):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it intentional that this inherits from RISCVAsmOperation? Your description makes it sound like these should be disjoint

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes I'll remove this, thank you

@superlopuh superlopuh merged commit 26b8eeb into main Nov 13, 2024
15 checks passed
@superlopuh superlopuh deleted the sasha/riscv/decouple-custom-format branch November 13, 2024 10:22
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
…sembly printing (xdslproject#3436)

We currently have a single base class for two kinds of shared
functionality: printing the assembly for the target, and printing the
custom format. I'd like to decouple them to migrate some RISC-V
operations to custom format, which cannot be provided at the same time
as custom printing and parsing functions.
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.

3 participants