Skip to content

Conversation

kg
Copy link
Member

@kg kg commented Jul 14, 2025

  • Remove GC.Collect, FailFast and System.Object.ctor intrinsics
  • Remove use of tag bit for helpers because it's not portable.
  • Disable specific part of a test that is broken by removal of the object.ctor intrinsic
  • Prevent newobj dvar from overlapping svars

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 14, 2025
@kg kg changed the title [interp] Various cleanups to CLR interpreter [interp] Some cleanups and fixes for CLR interpreter Jul 14, 2025
@kg kg marked this pull request as ready for review July 14, 2025 18:45
@Copilot Copilot AI review requested due to automatic review settings July 14, 2025 18:45
@kg kg requested review from BrzVlad and janvorli as code owners July 14, 2025 18:45
@kg
Copy link
Member Author

kg commented Jul 14, 2025

cc @jkotas thank you for pointing out the issue with the use of a tag bit for helpers. this should remove it

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements cleanups and fixes for the CLR interpreter focused on improving portability and removing unused functionality. The changes eliminate the use of tag bits for helper function indirection (which is not portable) and remove the GC.Collect intrinsic.

Key changes include:

  • Replacing tag-bit based helper function resolution with a structured approach using InterpHelperData
  • Removing the INTOP_GC_COLLECT instruction and related intrinsic handling
  • Updating instruction lengths and data layouts to accommodate the new helper data structure

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/coreclr/vm/interpexec.cpp Replaces GetPossiblyIndirectHelper implementation and removes GC.Collect instruction handling
src/coreclr/interpreter/intops.def Updates instruction lengths for helper-related opcodes and removes GC_COLLECT opcode
src/coreclr/interpreter/interpretershared.h Defines new InterpHelperData structure and removes tag bit constant
src/coreclr/interpreter/compiler.h Updates method signature for helper function data population
src/coreclr/interpreter/compiler.cpp Implements new helper data population logic and updates debug printing

@kg kg force-pushed the interp-cleanup-1 branch from e201948 to e135d4a Compare July 15, 2025 13:12
@kg
Copy link
Member Author

kg commented Jul 15, 2025

Significantly revised based on vlad and jkotas's feedback.

@kg kg force-pushed the interp-cleanup-1 branch from dfa2c13 to dda1459 Compare July 15, 2025 13:53
Checkpoint: Partial removal of tagged helper functions

Update ip[] in interpexec side for helper data change

Update compiler side for helper indirect tag bit removal

Update opcode lengths
Cleanup

Address copilot review comment

Speculative removal of fixme

Remove INTOP_FAILFAST
Add message to default opcode assert

Fix Object.ctor intrinsic eating newobj opcodes

Test debugging

Checkpoint: Partial revert

Repair revert

Remove EmitCallIntrinsics

Comment out broken check

Repair merge damage

Test debugging

Remove incorrect zeroing of dreg in NEWOBJ_VT

Revert diagnostic test changes

Prevent newobj dvar from overlapping svars
@kg kg force-pushed the interp-cleanup-1 branch from c6d7d7c to 3088e0e Compare July 15, 2025 20:18
@kg
Copy link
Member Author

kg commented Jul 16, 2025

/ba-g #117669

@kg kg merged commit a79dfff into dotnet:main Jul 16, 2025
102 of 104 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants