dotnet / dotnet/runtime

JIT: Unnecessary GC transitions recorded for tailcalls

Open
#120,933 2 comments 1 reaction 2 assignees Claimed by @jakobbotsch View on GitHub
area-CodeGen-coreclr
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

The logic in `emitIns_Call` removes callee-trashed registers from the saved set recorded:
https://github.com/dotnet/runtime/blob/8cb57abc62d859b9dce43f2ccb45912a41f85dc1/src/coreclr/jit/emitxarch.cpp#L11174-L11177

For jumps this does not really make sense. We should be able to avoid some unnecessary GC transitions by avoiding changing the gcref regs/byref regs when `params.isJump`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.