Skip to content

Implement UnknownSizeFrame for locals with unknown size#125491

Open
snickolls-arm wants to merge 5 commits intodotnet:mainfrom
snickolls-arm:stack-frame
Open

Implement UnknownSizeFrame for locals with unknown size#125491
snickolls-arm wants to merge 5 commits intodotnet:mainfrom
snickolls-arm:stack-frame

Conversation

@snickolls-arm
Copy link
Copy Markdown
Contributor

Implements a simple bump allocator for TYP_SIMD and TYP_MASK. Locals are allocated to this space when lvaIsUnknownSizeLocal is true for the variable.

The frame is implemented on ARM64 as two homogenenous blocks containing either TYP_SIMD or TYP_MASK locals. The x19 register is reserved for addressing locals in the block. Updates codegen for SVE memory transfer instructions to accept indices in multiples of the vector length (or VL / 8 for masks) instead of deriving them from the size of the local.

Implements a simple bump allocator for TYP_SIMD and TYP_MASK. Locals are
allocated to this space when lvaIsUnknownSizeLocal is true for the variable.

The frame is implemented on ARM64 as two homogenenous blocks containing either
TYP_SIMD or TYP_MASK locals. The x19 register is reserved for addressing locals
in the block. Updates codegen for SVE memory transfer instructions to accept
indices in multiples of the vector length (or VL / 8 for masks) instead of
deriving them from the size of the local.
@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 Mar 12, 2026
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 12, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

@jakobbotsch jakobbotsch self-requested a review March 16, 2026 09:46
@snickolls-arm
Copy link
Copy Markdown
Contributor Author

Looking at the throughput differences, the performance of lvaIsUnknownSizeLocal is probably not very good, maybe adding another property bit to LclVarDsc could help with this.

* Add function header
* Create UnknownSizeFrame::GetAddressingOffset and revert changes to lvaFrameAddress
* Use rsSetRegsModified and remove kill ref position
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI arm-sve Work related to arm64 SVE/SVE2 support community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants