Uh oh!
There was an error while loading. Please reload this page.
JIT: Prevent generic context runaway during inlining of polymorphic recursive methods - #90306
Conversation
…ecursive methods The inliner heuristics do not take into account that inlining methods causes type/method loading of the generic context. After dotnet#88749 this can quickly cause significant resources to be consumed as part of inlining when polymorphic recursion is involved (the blow-up can be exponential, as we see in the failing test under jitstress). This PR adds another safe-guard to the recursive inlining check in terms of a complexity limit on the generic context of the inline candidate. Fixdotnet#90144
ghost
commented
Aug 10, 2023
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThe inliner heuristics do not take into account that inlining methods causes type/method loading of the generic context. After #88749 this can quickly cause significant resources to be consumed as part of inlining when polymorphic recursion is involved (the blow-up can be exponential, as we see in the failing test under jitstress). This PR adds another safe-guard to the recursive inlining check in terms of a complexity limit on the generic context of the inline candidate. Fix #90144
|
jakobbotsch
commented
Aug 10, 2023
jakobbotsch
commented
Aug 10, 2023
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
jakobbotsch
commented
Aug 10, 2023
cc @dotnet/jit-contrib PTAL @EgorBo (and @AndyAyersMS if available) |
JulieLeeMSFT
commented
Aug 10, 2023
PTAL @agocke@MichalStrehovsky . |
EgorBo
commented
Aug 11, 2023
EgorBo
commented
Aug 11, 2023
Ah I didn't notice you already had it 🙂 don't know how to cancel |
The inliner heuristics do not take into account that inlining methods causes type/method loading of the generic context. After #88749 this can quickly cause significant resources to be consumed as part of inlining when polymorphic recursion is involved (the blow-up can be exponential, as we see in the failing test under jitstress).
This PR adds another safe-guard to the recursive inlining check in terms of a complexity limit on the generic context of the inline candidate.
Fix#90144