-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
Description
It seems that inlining decisions made in cold code blocks are being remembered by JIT and blindly used later in completely unrelated methods.
Reproduction Steps
https://godbolt.org/z/9zas8rc6h
Expected behavior
C:InnocentMethod
implicitly converts the provided Span into a ReadOnlySpan without using a op_Implicit
call.
Actual behavior
Trivially inline-able methods (even intrinsic methods) are not inlined in normal methods.
Regression?
.NET 7 seems to not have this issue.
Known Workarounds
No reliable workarounds, can reduce chances by avoiding any potential inlining in cold code blocks or re-ordering method JIT compilation order.
BoyBaykillerBoyBaykiller
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI