-
Notifications
You must be signed in to change notification settings - Fork 5.4k
When demoting aggregate returns, no need to return back the new argument pointer #7381
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
base: master
Are you sure you want to change the base?
Conversation
…t_demotion_simplify
Code size impact on "should_pass" tests.
|
This PR also address Point Sway:
IR before this PR:
and IR after this PR:
|
lw $r2 $$locbase i8 ; load word | ||
mcpi $r0 $r2 i32 ; copy memory | ||
move $$retv $r0 ; set return value | ||
move $$retv $zero ; set return value |
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.
Can we also remove this 'move'.
Callers are not using them, so I imagine DCE is removing things on the caller side. Which means we can remove this safely here.
Maybe IR needs the concept of fns that do not return anything. Or even a specialized IR/asm generation for ZST?
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.
Since that's kind of a separate optimization in itself (in the IR we only return with a value, today), I'll do that as a separate PR
This aids optimizations to perform better. For example https://github.com/IGI-111/blackjack comes down from
22.288 KB
to21.312 KB
.