Use CORJIT_PREJIT_UNSUPPORTED instead of CORJIT_LIMITATION for BlockNonDeterministicIntrinsics#123716
Conversation
…onDeterministicIntrinsics
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4554074 to
acd3f38
Compare
|
Needs to be handled in AOT compilers too (src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs/CorInfoTypes.cs) |
There was a problem hiding this comment.
Pull request overview
This PR introduces a distinct JIT failure code for ReadyToRun/prejit-unsupported scenarios (instead of using CORJIT_IMPLLIMITATION) to address failing SPMI runs during x86 crossgen.
Changes:
- Add a new
CorJitResultvalue (CORJIT_R2R_UNSUPPORTED) to represent R2R/prejit unsupported failures. - Update JIT + VM + tooling (SuperPMI, managed JitInterface) to propagate and handle the new result code.
- Switch
BlockNonDeterministicIntrinsicsto report the new result instead ofCORJIT_IMPLLIMITATION.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/jitinterface.cpp | Treat CORJIT_R2R_UNSUPPORTED similarly to other invalid-program JIT results when throwing. |
| src/coreclr/tools/superpmi/superpmi/jitinstance.cpp | Allow SuperPMI to record CORJIT_R2R_UNSUPPORTED as a non-error compile outcome. |
| src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs | Add managed enum value for CORJIT_R2R_UNSUPPORTED. |
| src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs | Map CORJIT_R2R_UNSUPPORTED to the same handling as impl limitations (R2R: RequiresRuntimeJitException). |
| src/coreclr/jit/error.h | Add a new fatal helper declaration for R2R unsupported failures. |
| src/coreclr/jit/error.cpp | Implement the new fatal helper to return CORJIT_R2R_UNSUPPORTED. |
| src/coreclr/jit/compiler.h | Change BlockNonDeterministicIntrinsics to use the new R2R unsupported fatal helper. |
| src/coreclr/jit/compiler.cpp | Include CORJIT_R2R_UNSUPPORTED in the “retry with minopts” failure list. |
| src/coreclr/inc/corjit.h | Add the new CorJitResult enum value. |
|
PTAL @jkotas @jakobbotsch |
|
The delta looks fine to me, but I do not know any details about the issue you are trying to fix. |
This specific one is not rare and it's completely fine to hit it (e.g. some SIMD API that may return different results on JIT and R2R) - so instead of ignoring all |
|
/ba-g deadletter |
Apply @jakobbotsch's suggestion to unblock failing SPMI (x86-crossgen)