Open BruceForstall opened 11 months ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Author: | BruceForstall |
---|---|
Assignees: | - |
Labels: | `area-CodeGen-coreclr` |
Milestone: | 9.0.0 |
"Loop peeling" is a compiler optimization that unrolls a loop into two copies. In the variant of interest here, the first copy executes the first iteration of the loop, and the second copy executes the remaining iterations of the loop. Given the structure and semantics of .NET code, it is believed that peeling the first iteration will allow better optimization of the remaining iterations by constructing CSEs in the first copy in exception order, and using them in the second copy where exception checking such as null checking of arrays can be removed.