dotnet / dotnet/runtime

JIT: Consider Moving JIT retry to host

Open
#127,235 1 comment 0 reactions 0 assignees View on GitHub
area-CodeGen-coreclr
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Currently, the JIT will retry compilation without optimizations enabled in the presence of certain failure cases, listed here: https://github.com/dotnet/runtime/blob/cd0e7b937a7eae8d44e9e868b0765faf02ba73ee/src/coreclr/jit/compiler.cpp#L7735

Experience in developing the Wasm backend has shown that if some of these known errors are thrown too late in compilation (e.g., after codegen), then there can be bugs around persistent state from the previous compilation when we retry. We should consider changing the approach to compilation retry in these cases to be the responsibility of the host, so that the host can re-trigger a fresh compilation to avoid any issues with stale state from the previous one.

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.