Skip to content

Inlining and explicit tail calls #10487

@AndyAyersMS

Description

@AndyAyersMS

We should re-examine the logic the jit uses for inlining in the presence of explicit tail calls (calls with a tail prefix). Currently the jit won't inline any method that is explicitly tail called

https://github.com/dotnet/coreclr/blob/7e215941c8d6a68fa52f98bb8fd2a419d8a1ef5d/src/jit/importer.cpp#L18943-L18949

or any method that makes an explicit tail call:

https://github.com/dotnet/coreclr/blob/7e215941c8d6a68fa52f98bb8fd2a419d8a1ef5d/src/jit/flowgraph.cpp#L5434-L5442

Both of these should be allowed provided with reasonable checks (former: callee frame is not overly huge; latter: call site is in tail position).

category:cq
theme:tail-call
skill-level:expert
cost:medium
impact:medium

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions