dialects: (riscv) add riscv32 and riscv64 shift ops#5564
dialects: (riscv) add riscv32 and riscv64 shift ops#5564osmanyasar05 wants to merge 21 commits intoxdslproject:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5564 +/- ##
==========================================
- Coverage 86.25% 86.23% -0.02%
==========================================
Files 403 403
Lines 56660 56787 +127
Branches 6512 6518 +6
==========================================
+ Hits 48871 48972 +101
- Misses 6268 6295 +27
+ Partials 1521 1520 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Addressed the comments on naming conventions, cleaned up the PR to only have a prototype of the changes. Currently, there are only Should other operation types (with identical implementations across RV32/RV64) live in the base |
|
Thank you! The PR already looks pretty good :) |
|
So one thing to do here might be to do a PR that makes all the changes (just to see what the implications are), even if we merge them one PR at a time. In this case, I think this PR is probably good to merge, but it will be much easier to judge this if there's a PR with all the changes that rely on this one that we can also look at and discuss. Could you please have a go at removing the riscv dialect ops that you've duplicated here, and see what the impact is on existing code? The existing code assumes that the indexwidth is 32 (for some passes), and should just insert the rv32 variant. This would ideally be in a separate PR just so this one remains easy to merge. How do you feel about having a go at this? |
Hello, opened a new PR (#5589) doing what you suggested. I am happy to work on this with separate PRs that we merge along the way. |
|
This is great, commented on that PR. |
|
should we merge this PR? @luisacicolini @superlopuh |
|
I'm not 100% sure, but if it's OK with you I'd like to first iterate with you on the other PR to its conclusion, and then figure out whether this should be the first PR to merge or another subset of the other branch. |
|
Merged changes from a259e76, that added Li op. Now I think we should focus on getting this PR merged. Similar to a259e76, I'll remove shift instructions from the main dialect and modify test cases. Then we can work on canonicalization patterns in another PR. https://github.com/xdslproject/xdsl/pull/5589/changes#diff-070c5a8a21ea33e601f29becbb1305e5aeea2c45f5256f2e2d88e3efcd04cc10 holds the complete changes with canonicalization patterns and tests. |
|
let's keep iterating in the other PR, it would still be better to have all the changes in one place before we decide how to merge them, since in my mind operations should be replaced in one go |
|
Let's close this for now and iterate on the other PR, can reopen this one later if we want |
This PR adds shift instructions to the
riscv32andriscv64dialects.