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

documentation: (toy) add initial lowering to riscv #1365

Merged
merged 1 commit into from Jul 31, 2023

Conversation

superlopuh
Copy link
Member

Adds the structure of the riscv lowering and the first pass. I added some future changes as TODOs so that the remaining work is clear.

@superlopuh superlopuh added the documentation Improvements or additions to documentation label Jul 29, 2023
@superlopuh superlopuh self-assigned this Jul 29, 2023
@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04% 🎉

Comparison is base (37b3082) 89.71% compared to head (ec6ca66) 89.76%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1365      +/-   ##
==========================================
+ Coverage   89.71%   89.76%   +0.04%     
==========================================
  Files         196      198       +2     
  Lines       25269    25342      +73     
  Branches     3800     3807       +7     
==========================================
+ Hits        22671    22748      +77     
+ Misses       1999     1997       -2     
+ Partials      599      597       -2     
Files Changed Coverage Δ
docs/Toy/toy/rewrites/setup_riscv_pass.py 100.00% <100.00%> (ø)
docs/Toy/toy/tests/test_add_sections.py 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

)


class AddSections(RewritePattern):
Copy link
Member Author

Choose a reason for hiding this comment

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

With @AntonLydike's riscemu malloc and friends, the .bss section hack is not necessary, similarly we can probably get away with dropping the data section. I'd like to first merge the end-to-end flow as it's working today, and make it better later, if that's ok with everyone.

Copy link
Collaborator

@AntonLydike AntonLydike left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +107 to +110
DeadCodeElimination().apply(ctx, module_op)
# ReconcileUnrealizedCastsPass().apply(ctx, module_op)

DeadCodeElimination().apply(ctx, module_op)
Copy link
Collaborator

Choose a reason for hiding this comment

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

twice?

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 guess not really necessary right now, I'll remove it in the next PR

@superlopuh superlopuh merged commit b5c94cc into main Jul 31, 2023
10 checks passed
@superlopuh superlopuh deleted the sasha/wm/setup-riscv branch July 31, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants