-
Notifications
You must be signed in to change notification settings - Fork 108
Use stack_store
instead of stack_addr
+store
when building structs
#1265
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
Conversation
If I recall correctly I did this because stack_store/stack_load would legalize into multiple stack_addr instructions. One for each stack access, which was at least back then slower. |
I think that's whats happening anyway, here's what i pulled out of a testcase (with the current master branch): bool_11_perturbed_big
Is there a way for me to benchmark this, so that we can check? Edit: But the comments do point at a |
Ok, I think I originally looked at the If I go back to Up to you if you want to merge this or close it, it looks like my problem was looking at the |
This seems to be a slight improvement for simple-raytracer:
|
Nice! |
👋 Hey,
When building structs for calling functions we currently emit a
stack_addr
and astore
, this is a little bit verbose and it annoyed me a little bit when looking at the generated clif code.This changes the ABI building code to use a
stack_store
instead.The previous code looks something like this:
And now we generate this:
Which is slightly nicer to read.
It doesn't make a lot of difference, since after optimizations it goes back to the
stack_addr
+store
format anyway