Skip to content

Conversation

@jakobbotsch
Copy link
Member

Switch the handling of GT_JMP into a single unified implementation that utilizes the new ABI representation.

Initially I tried doing this through #80732, by implementing support for fast tailcalls on win-x86, but it is non-trivial to guarantee that all GT_JMP calls can be translated into fast tail-callable GT_CALL in all scenarios.

Switch the handling of `GT_JMP` into a single unified implementation
that utilizes the new ABI representation.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 11, 2024
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @kunalspathak

Some minor diffs where the new logic allows using some wider reads from the stack for struct locals. This should be fine.

@jakobbotsch jakobbotsch requested a review from kunalspathak May 13, 2024 17:42
{
JITDUMP("\t\t\t\t\t\t\tVar V%02u becoming live\n", varNum);
regNumber intArgReg = compiler->getCallArgIntRegister(segment.GetRegister());
inst_Mov(TYP_LONG, intArgReg, segment.GetRegister(), /* canSkip */ false,
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason why we can't skip the move, if possible?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will never be possible (this is moving from an XMM register to a GP register)

Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM

@jakobbotsch jakobbotsch merged commit 039d2ec into dotnet:main May 14, 2024
@jakobbotsch jakobbotsch deleted the GT_JMP-new-abi branch May 14, 2024 14:03
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
Switch the handling of `GT_JMP` into a single unified implementation
that utilizes the new ABI representation.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
@jakobbotsch jakobbotsch restored the GT_JMP-new-abi branch June 6, 2025 06:45
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants