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: Unify GT_JMP handling in the backends #102117

Merged
merged 3 commits into from
May 14, 2024

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.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 11, 2024
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.

{
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
Member

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
Member

@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
105 of 107 checks passed
@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
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