-
Notifications
You must be signed in to change notification settings - Fork 54
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
Spilling mutable reg ptr arguments is hard #850
Comments
Note that there is a file testing this feature, namely |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a function
fn f (reg ptr u8[N] r) -> reg ptr u8[N]
that uses a lot of registers, so I want to spill the argument before the call and unspill it after the call.But in this code, the region associated to variable
s
, and then to variabler
is partial. I have to copy backr
intos
after the call. This spurious assignment will be removed by stack alloc, there is code dedicated to it.This is accepted by the compiler, but does not do what I want at all. The first
s = r
is removed, sinces
is dead. Here is a solution.This works as expected, but is not so natural.
The text was updated successfully, but these errors were encountered: