dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.84k stars 4.62k forks source link

JIT: SVE Cleanup - Remove `unsafe` from APIs that do not use pointers. #104845

Open TIHan opened 1 month ago

TIHan commented 1 month ago

Because we have been copying and pasting from the generated code for SVE, the generation always marked the APIs as unsafe. We need to remove unsafe from them if the API does not use any pointers.

Relevant files:

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics See info in area-owners.md if you want to be subscribed.

a74nh commented 4 weeks ago

I recommend doing this after making the files alphabetical in https://github.com/dotnet/runtime/issues/104834

a74nh commented 4 weeks ago

priority:2 for RC1 snap : User visible API

tannergooding commented 4 weeks ago

This is more rather priority 3, or could even be pushed out to .NET 10.

Marking an API as unsafe has no impact to the public signature, it simply allows the internal implementation to use pointers and the public signature to contain pointers. It's then only if the public signature contains pointers that the downstream consumers must also themselves use unsafe.

In many cases we've just marked the entire class as unsafe to simplify long term revisions/changes to known lowlevel code.

JulieLeeMSFT commented 4 weeks ago

Pushing out to .NET 10 because we have many issues for RC1 snap.