Repository navigation
Closed
Labels
User StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
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 9.
Planned for .NET 9
Loop recognition and canonicalization
- (Q4 '23) Certain loops do not get recorded in optLoopTable #43713 Describes two cases where loops are missed due to various issues.
- [JIT] Asm difference for F# and C# methods #58941 F# loops not recognized
Loop cloning
- Consider rebuilding loop table after loop cloning #62615 Consider rebuilding loop table after loop cloning
Induction variables
- RyuJIT: Index Variable Widening optimization for array accesses #7312 RyuJIT: Index Variable Widening optimization for array accesses
- RyuJIT: Implement induction variable analysis #93143 RyuJIT: Implement induction variable analysis
- (Q2'24) JIT: Add support for strength reduction #100913 JIT: Add support for strength reduction
- JIT: Add a disabled-by-default implementation of strength reduction #104243
- JIT: Prove some cases where strength reducing to GC pointers is ok #104679
- JIT: Refine post-dominance check in strength reduction #104687
- JIT: Improve strength reduction's prediction of loop reversal #104800
- Add strength reduction benchmarks performance#4317
- JIT: Add a pass to remove unused primary IVs #105107
- JIT: Improve and fix
StaysWithinManagedObject#105108 - JIT: Enable strength reduction by default #105131
- JIT: Switch
StaysWithinManagedObjectto peel offsets from VNs #105169
Pushed out of .NET 9
Loop cloning
- (Q4 '23) Loops aren't cloned for Spans #82946 Support loop cloning for Span
- Support loop cloning of class member arrays #77071 Support loop cloning of class member arrays
- Support loop cloning with non-int iteration variables #85552 Support loop cloning with non-int iteration variables
Multi-dimensional array improvements
- RyuJIT: support cloning loop nests with multi-dimensional array accesses #71674 RyuJIT: support cloning loop nests with multi-dimensional array accesses
- Improve hoisting, CSE, LSRA for MD array accesses #71676 Improve hoisting, CSE, LSRA for MD array accesses
Loop peeling
- (Stretch) Implement loop peeling #93142 Implement loop peeling
Reacted by Günther Foidl, eduardobragaxz, Shreyas Jejurkar, Jiří Sýkora, Paulus Pärssinen, Gerard Smit and Pent Ploompuu
Metadata
Metadata
Assignees
Labels
User StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Type
Projects
- StatusShow more project fieldsDone
Activity
jakobbotsch commentedon Dec 13, 2023
With recent work we are close to having moved from the old lexical representation of loops to a more general graph-based one. Since I'll be out until New Year's, here's a more detailed list of work done and expected future work.
optSetBlockWeightsand byoptFindAndScaleGeneralLoopBlocks, but should be switchable to the new dominator implementation relatively easily.optFindAndScaleGeneralLoopBlocksalso depends on dense reachability sets; in common cases (where the flow graph does not have irreducible loops) we may be able to replace them by loop containment checks. Eventually we'd like all of this to be replaced by profile synthesis.BBJ_RETURNloop cloning quirk #96555Some stats from the loop representation switch over some of our win-x64 collections:
JulieLeeMSFT commentedon Jul 30, 2024
.NET9 work is complete. Closing.
JulieLeeMSFT commentedon Jul 30, 2024
Will move the pushed-out items to .NET 10 user story during .NET 10 planning.