Skip to content

Conversation

@AndyAyersMS
Copy link
Member

For arm void return methods, the profiler leave hook codegen kills R0. Model this so we don't inadvertently report R0 as gc-live.

Fixes #117149.

For arm void return methods, the profiler leave hook codegen kills R0.
Model this so we don't inadvertently report R0 as gc-live.

Fixes dotnet#117149.
Copilot AI review requested due to automatic review settings July 1, 2025 15:34
Copy link
Contributor

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 fixes an issue where the profiler leave hook kill set for ARM void return methods incorrectly handled R0. The changes update the getKillSetForReturn function to take a GenTree return node parameter across several architectures, ensuring that the kill set is correctly modeled based on the method's return type.

  • Updates getKillSetForReturn to accept a GenTree pointer parameter.
  • Applies changes in ARM, ARM64, ARC, RISCV64, and other related architectures.
  • Ensures documentation in lsra.h is updated to match the new signature.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/jit/lsraxarch.cpp Passes the return node to getKillSetForReturn for ARM arch.
src/coreclr/jit/lsrariscv64.cpp Passes the return node to getKillSetForReturn for RISCV64.
src/coreclr/jit/lsraloongarch64.cpp Passes the return node to getKillSetForReturn for LoongArch64.
src/coreclr/jit/lsrabuild.cpp Updates getKillSetForReturn signature and usage across methods.
src/coreclr/jit/lsraarm64.cpp Applies new getKillSetForReturn signature for ARM64 code.
src/coreclr/jit/lsraarm.cpp Applies new getKillSetForReturn signature for ARM code.
src/coreclr/jit/lsra.h Updates the function declaration to include a GenTree parameter.

@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Jul 1, 2025

@dotnet/jit-contrib PTAL

gcstress extra may not run cleanly as there are other issues (stack overflow tester, etc).

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 1, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr gcstress-extra

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@risc-vv
Copy link

risc-vv commented Jul 1, 2025

@dotnet/samsung Could you please take a look? These changes may be related to riscv64.

@risc-vv
Copy link

risc-vv commented Jul 1, 2025

1868fe7 is being scheduled for building and testing

GIT: 1868fe78fcafed1a1ea98001e54f1864aca643ab
REPO: dotnet/runtime
BRANCH: main

Details

Release-build FAILED

buildinfo.json
Compilation failed during core build

@AndyAyersMS
Copy link
Member Author

Ah, we just changed the jit GUID..

@AndyAyersMS AndyAyersMS merged commit 2a04cff into dotnet:main Jul 2, 2025
134 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

baseservices/exceptions/generics/nested-try-catch04 crashing under jitstress/gcstress on arm

3 participants