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: Unnecessary copies for promoted struct arguments #6318

Closed
sejongoh opened this issue Jul 13, 2016 · 2 comments
Closed

Unix: Unnecessary copies for promoted struct arguments #6318

sejongoh opened this issue Jul 13, 2016 · 2 comments
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) tenet-performance Performance related issue
Milestone

Comments

@sejongoh
Copy link
Contributor

If an struct argument is promoted to registers, the codegen cannot handle this and copies should be generated in fgMorphArgs. It is desired to avoid copies and make the codegen copy struct directly to outgoing argument area.

Disabling the following code in `fgMorphArgs' can reproduce the problem.

if (lclVar != NULL)
{
    // If the struct is promoted to registers, it has to be materialized
    // on stack. We may want to support promoted structures in
    // codegening pugarg_stk instead of creating a copy here.
    LclVarDsc*  varDsc = &lvaTable[lclVar->gtLclVarCommon.gtLclNum];
    needCpyBlk = varDsc->lvPromoted;
}
@sejongoh
Copy link
Contributor Author

Original issue: #5024

@CarolEidt
Copy link
Contributor

Closed with dotnet/coreclr#18358

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 30, 2020
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) tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

3 participants