dotnet / runtime

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

Improve JIT loop optimizations (.NET 10) #108901

Open BruceForstall opened 1 month ago

BruceForstall commented 1 month ago

We plan to continue improving JIT optimization capabilities for loop code. An overview of many JIT optimization possibilities is here; this issue will focus on issues we choose to address in .NET 10.

Significant work was done in .NET 9; the list of work here for .NET 10 is much more modest.

The corresponding .NET 9 issue is https://github.com/dotnet/runtime/issues/93144.

Planned for .NET 10

Update loop inversion implementation

The current loop inversion algorithm is lexical. Convert it to be graph based. This is part of the JIT flowgraph modernization push, and is tracked by https://github.com/dotnet/runtime/issues/107749.

Loop cloning

Multi-dimensional array improvements

Induction variable optimizations

Loop peeling

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

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