-
Notifications
You must be signed in to change notification settings - Fork 5.3k
JIT: Refactor CSE candidate storage slightly #116009
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
JIT: Refactor CSE candidate storage slightly #116009
Conversation
CSE candidates had separate storage for the first candidate and subsequent candidates. This introduces some awkwardness when adding the second candidate to the list. Refactor things so that the first candidate is stored inline in `CSEDsc` as a normal list entry.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactor the storage of CSE candidates by replacing separate fields for the first occurrence (csdTree, csdStmt, csdBlock) with an inline tree statement list (csdTreeList).
- Replace pointer fields with a value struct for the tree statement list in CSEdsc.
- Update all references and iterations from direct csdTree access to csdTreeList.tslTree accordingly.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/coreclr/jit/optcse.h | Updated CSEdsc structure to store the first candidate inline. |
| src/coreclr/jit/optcse.cpp | Revised all accesses to use csdTreeList.tslTree and adjusted loops to iterate from the list head. |
CSE candidates had separate storage for the first candidate and subsequent candidates. This introduces some awkwardness when adding the second candidate to the list.
Refactor things so that the first candidate is stored inline in
CSEDscas a normal list entry.Best reviewed with whitespace turned off.