Delete unused WBF_NoBarrier_CheckNotHeapInDebug and CORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAP#128230
Conversation
…GN_REF_ENSURE_NONHEAP Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/f12f1f82-9c79-435d-a7cc-c641d3ab582c Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
Removes a dead GC write barrier form and its corresponding JIT helper from the CoreCLR JIT/EE interface, simplifying write barrier selection and eliminating unused VM/JIT code paths.
Changes:
- Deleted
GCInfo::WBF_NoBarrier_CheckNotHeapInDebugand theCORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAPhelper (plus the VM entrypointJIT_WriteBarrierEnsureNonHeapTarget). - Simplified JIT write-barrier helper selection and helper property classification by removing the now-unreachable cases.
- Bumped the JIT/EE version GUID to reflect the
CorInfoHelpFuncenum change.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/jitinterface.h | Removes the VM-side FCDECL for the deleted helper entrypoint. |
| src/coreclr/vm/gchelpers.cpp | Deletes the unused JIT_WriteBarrierEnsureNonHeapTarget helper implementation. |
| src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs | Removes the managed mirror enum entry for CORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAP. |
| src/coreclr/jit/utils.cpp | Drops the helper from HelperCallProperties mutation classification. |
| src/coreclr/jit/jitgcinfo.h | Removes the unused write barrier form enum value and its explanatory comment block. |
| src/coreclr/jit/codegenwasm.cpp | Removes the WASM helper signature entry for the deleted helper. |
| src/coreclr/jit/codegencommon.cpp | Removes dead write-barrier selection cases and simplifies optimized write-barrier checks. |
| src/coreclr/inc/jithelpers.h | Removes the helper mapping entry from the JIT helper table. |
| src/coreclr/inc/jiteeversionguid.h | Updates the JIT/EE interface GUID due to CorInfoHelpFunc enum change. |
| src/coreclr/inc/corinfo.h | Removes the CorInfoHelpFunc enum member CORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAP. |
|
@copilot Apply the formatting patch from https://github.com/dotnet/runtime/actions/runs/25902777975/artifacts/7011056595 |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/b7ce8ca9-f443-404b-9304-bf6f47e40d39 Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Applied the formatting patch from the artifact and pushed it in commit |
|
/ba-g timeout |
Removes the unused
WBF_NoBarrier_CheckNotHeapInDebugwrite barrier form and the associatedCORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAPJIT helper (JIT_WriteBarrierEnsureNonHeapTarget).GCInfo::WBF_NoBarrier_CheckNotHeapInDebugis never produced bygcIsWriteBarrierCandidate(or anywhere else), so the helper is never emitted and all of its consumers are dead code paths.Changes
CORINFO_HELP_ASSIGN_REF_ENSURE_NONHEAPfromcorinfo.h,CorInfoHelpFunc.cs, andjithelpers.h.WBF_NoBarrier_CheckNotHeapInDebugfromjitgcinfo.h.genUseOptimizedWriteBarriersoverloads and dropped the correspondingcasefromgenWriteBarrierHelperForWriteBarrierFormincodegencommon.cpp; removed the case from themutatesHeapanalysis inutils.cpp; removed the WASMHELPER_SIGincodegenwasm.cpp.JIT_WriteBarrierEnsureNonHeapTargetdeclaration fromvm/jitinterface.hand its implementation fromvm/gchelpers.cpp.jiteeversionguid.hsince theCorInfoHelpFuncenum changed.Validation
./build.sh clr -rc checkedsucceeded with 0 warnings, 0 errors.Note
This PR was authored with assistance from GitHub Copilot.