Skip to content

JIT: Unnecessary GC transitions recorded for tailcalls #120933

@jakobbotsch

Description

@jakobbotsch

The logic in emitIns_Call removes callee-trashed registers from the saved set recorded:

// Trim out any callee-trashed registers from the live set.
regMaskTP savedSet = emitGetGCRegsSavedOrModified(params.methHnd);
regMaskTP gcrefRegs = params.gcrefRegs & savedSet;
regMaskTP byrefRegs = params.byrefRegs & savedSet;

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.

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions