Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement loop peeling #93142

Open
BruceForstall opened this issue Oct 6, 2023 · 1 comment
Open

Implement loop peeling #93142

BruceForstall opened this issue Oct 6, 2023 · 1 comment
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@BruceForstall
Copy link
Member

"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.

@BruceForstall BruceForstall added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 6, 2023
@BruceForstall BruceForstall added this to the 9.0.0 milestone Oct 6, 2023
@ghost
Copy link

ghost commented Oct 6, 2023

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

Issue Details

"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.

Author: BruceForstall
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: 9.0.0

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
Projects
None yet
Development

No branches or pull requests

2 participants