Skip to content

Conversation

@sandreenko
Copy link
Contributor

We have such optimization for lclVar addresses that we pass to calls (in fgMorphArgs):

        if (argx->IsLocalAddrExpr() != nullptr)
        {
            argx->gtType = TYP_I_IMPL;
        }

so ADDR->gtType could be a better type than TYP_BYREF.

@sandreenko sandreenko added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization labels Feb 18, 2021
@sandreenko sandreenko marked this pull request as draft February 18, 2021 10:31

location->SetOper(addrForm(locationOp));
location->gtType = TYP_BYREF;
location->gtType = address->TypeGet();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
location->gtType = address->TypeGet();
location->ChangeType(address->TypeGet());

@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Feb 18, 2021
@sandreenko
Copy link
Contributor Author

This PR reveals several other issues, a bigger fix is needed, will do it in another PR but it is currently blocked as well.

@sandreenko sandreenko closed this Feb 22, 2021
@sandreenko sandreenko deleted the fixLclVarAddrCreation branch February 22, 2021 19:55
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 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 optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants