-
Notifications
You must be signed in to change notification settings - Fork 3
Experimental AVR target improvements #1
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
Experimental AVR target improvements #1
Conversation
05e9b65
to
5e80213
Compare
Thanks for the patches! I think our preference is to land everything in upstream LLVM before it finds its way into this repository, but this seems like a good place to track those patches before then (and also to allow @dylanmckay to grab them and review them) Said another way: I think this PR can stay open, but not be merged until each of the commits has been merged into LLVM. |
Oh, I thought it was exactly the other way round -- that this repo is to stage dubious changes until they can be upstreamed to LLVM. BTW, most definitely don't merge this PR, since the last three commits break structure unpacking: avr-rust/rust-legacy-fork#48 |
bf415da
to
9fe62d7
Compare
This branch now has a ton of useful fixes with which I was able to compile a non-trivial Rust app to AVR (I hope to write a blog post about it shortly). Can I leave it in your hands to upstream it to LLVM proper? |
@gergoerdi each separate fix to LLVM should have one or more tests associated with it; otherwise it's highly likely that any fixes will regress with time. @dylanmckay any other things you'd like to see? |
@shepmaster OK I'll try to find the time to add tests for the new fixes. My question still stands though -- can you or @dylanmckay take care of the upstreaming? I'm not yet invested enough in this to want to take on that hassle. |
Also, I think there's three categories of my commits here:
I don't think commits from the third category should be merged; I'll open a separate ticket where we can hopefully come up with a proper solution to |
65f3f2a
to
4e1e3f0
Compare
I'm happy to take on upstreaming @gergoerdi, will keep you updated. |
@@ -2057,6 +2109,10 @@ def : Pat<(store i8:$src, (i16 (AVRWrapper tglobaladdr:$dst))), | |||
def : Pat<(store i16:$src, (i16 (AVRWrapper tglobaladdr:$dst))), | |||
(STSWKRr tglobaladdr:$dst, i16:$src)>; | |||
|
|||
// Temporary workaround -- this one is BOGUS! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this temporary? What is it working around? Can you pop a comment somewhere with an explanation?
… same spot Contributed by Dr. Gergő Érdi. Fixes a bug. Raised from (avr-rust/rust-legacy-fork#49). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302973 91177308-0d34-0410-b5e6-96231b3b80d8
9b6cd32
to
f4d1897
Compare
5e0418c
to
e65b858
Compare
(avr-rust/rust-legacy-fork#50) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304283 91177308-0d34-0410-b5e6-96231b3b80d8
When generating code for a shift loop, check the shift amount against the literal value 0, not R0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304284 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: CPI does not read the status register, but only writes it. Reviewers: dylanmckay Reviewed By: dylanmckay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33223 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304116 91177308-0d34-0410-b5e6-96231b3b80d8
…e same spot as the original MBB (avr-rust/rust-legacy-fork#62)
(avr-rust/rust-legacy-fork#63 avr-rust/rust-legacy-fork#64) [AVR] Use 1-byte alignment for all data types (avr-rust/rust-legacy-fork#64)
For now, these relaxed branches are used unconditionally, even when the branch target is nearby. avr-rust/rust-legacy-fork#44
FIXME: implementation is mostly copy-pasted from LDWRdPtr, so we should refactor a bit and unify the two
e65b858
to
f3dcdf8
Compare
It looks like there's some stuff here that still needs to be merged I will change the base branch to see more clearly what is missing that should go into master |
That didn't help, the histories are different! |
Stuff to merge
I believe everything else is already upstreamed, or were temporary hacks |
Ran tests locally, all pass |
Wrong merge request! did not mean to merge, nor did I run tests for this PR. Reopening now, have reverted |
Looks like there's no reopen button, will just cherry-pick stuff now |
Upstreamed ""[AVR] Elaborate LDWRdPtr into ld r, X++; ld r+1, X"" in r314896. I also fixed a bunch of tests before committing |
Upsteamed |
Upsteamed "[AVR] Implement LPMWRdZ pseudo-instruction's expansion." in r314898 |
Updated version of LLVM in for Rust in avr-rust/rust-legacy-fork@a22dd46 |
Added these commits to the current AVR 5.0.1 merge request PR34829 |
Have double checked all the commits in this PR and everything looks good. Thanks for the patches @gergoerdi, sorry for taking so long, completely forgot about this PR! |
Noob alert: Please review very carefully -- I haven't even looked at LLVM's internals until a week ago.
The commits should be fairly self-explanatory; the fixes are for the following issues: