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

JIT: Remove CallArg::m_tmpNum #104429

Merged
merged 1 commit into from
Jul 10, 2024

Commits on Jul 4, 2024

  1. JIT: Remove CallArg::m_tmpNum

    Before this change the JIT has two places where it may introduce temps
    during call args morphing:
    1. Directly during `fgMorphArgs` as part of making struct copies for
       some struct args, like implicit byref args and other struct args
       requiring to be of `LCL_VAR` shape
    2. During `EvalArgsToTemps` as part of making sure evaluation order is
       maintained while we get the call into the right shape with registers
    
    To make this work we have `CallArg::m_tmpNum` that communicates the
    local from 1 to 2; the responsibility of creating the actual `LCL_VAR`
    node to put in the late argument list was left to `EvalArgsToTemps`
    while `fgMorphArgs` would just change the early setup node to a store
    into the temporary.
    
    This PR changes it so that 1 directly introduces the right late node
    when it creates its temporary. That is, it puts the call argument into
    the right shape immediately and avoids relying on `EvalArgsToTemps` to
    create the local node in the late list.
    
    The benefit of that is that we no longer need to communicate the
    temporary as part of every `CallArg`. However, the motivation here is
    something else: as part of dotnet#104370 we may have arguments that need
    multiple temporaries to copy, so having things working in this way
    introduces complications for that.
    jakobbotsch committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    7ed8eac View commit details
    Browse the repository at this point in the history