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

Unix: Unecessary struct copy while passing by value on stack #5024

Closed
sivarv opened this issue Jan 29, 2016 · 2 comments
Closed

Unix: Unecessary struct copy while passing by value on stack #5024

sivarv opened this issue Jan 29, 2016 · 2 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI enhancement Product code improvement that does NOT require public API changes/additions optimization os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX tenet-performance Performance related issue
Milestone

Comments

@sivarv
Copy link
Member

sivarv commented Jan 29, 2016

Say caller foo() is passing a struct 's' by value on stack to bar(), at high-level code generated is

// Make a copy of s by assigning to a local t on foo()'s stack frame
t = s
copy t on to stack
bar()

t = s copy is unnecessary as 's' could be directly copied to stack.

@sivarv sivarv changed the title Unix: Excessive struct copies while passing by value on stack Unix: unecessary struct copy while passing by value on stack Jan 29, 2016
@sivarv sivarv changed the title Unix: unecessary struct copy while passing by value on stack Unix: Unecessary struct copy while passing by value on stack Jan 29, 2016
@sejongoh
Copy link
Contributor

sejongoh commented Jul 15, 2016

dotnet/coreclr#6037 is merged.

dotnet/coreclr#6266, dotnet/coreclr#6265, and dotnet/coreclr#6264 are opened for cases not handled by dotnet/coreclr#6037.

@CarolEidt
Copy link
Contributor

Closing this, as dotnet/coreclr#18358 addressed the extra copies when passed on stack. dotnet/coreclr#6264 remains open because it includes extra copies when passed in registers.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@msftgits msftgits added this to the Future milestone Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI enhancement Product code improvement that does NOT require public API changes/additions optimization os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

5 participants