Skip to content

dialects: (riscv) Generic LiOp#5737

Open
osmanyasar05 wants to merge 4 commits intoxdslproject:mainfrom
osmanyasar05:generic_ops
Open

dialects: (riscv) Generic LiOp#5737
osmanyasar05 wants to merge 4 commits intoxdslproject:mainfrom
osmanyasar05:generic_ops

Conversation

@osmanyasar05
Copy link
Copy Markdown
Collaborator

This PR refactors the load immediate operation to use the generic LiOperation base class.

Comment thread xdsl/dialects/riscv/abstract_ops.py Outdated
@osmanyasar05
Copy link
Copy Markdown
Collaborator Author

@superlopuh I am not sure how to make the LoadImmediate0 canonicalization function fit into this perspective of doing things with generics. do we make it generic over I32, I64 or rv32.LiOp/rv64.LiOp?

Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
@superlopuh
Copy link
Copy Markdown
Member

let's try this: add the LiOpHasCanonicalizationPatterns trait on subclasses instead, and do the code duplication necessary to make it work first, then we can take a look at simplifying?

@superlopuh superlopuh added the dialects Changes on the dialects label Mar 20, 2026
@superlopuh
Copy link
Copy Markdown
Member

CI is failing, let's take a look together?

@osmanyasar05
Copy link
Copy Markdown
Collaborator Author

CI is failing, let's take a look together?

yes, would be nice!

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.

2 participants