Split assertionprop.cpp into integralrange.cpp and vnbasedmorph.cpp#124394
Split assertionprop.cpp into integralrange.cpp and vnbasedmorph.cpp#124394
Conversation
….cpp, and assertionprop.cpp Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
…between them Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
|
PTAL @dotnet/jit-contrib no diffs (except for some spurious diffs #124371) cleanup change. I just wanted to move unrelated to AssertionProp things out of assertionprop.cpp which is too big and hard to read:
Intentionally didn't try to wrap that into a separate phase or rename anything to avoid complicating the code-review. I recommend reviewing with whitespaces disabled. |
There was a problem hiding this comment.
Pull request overview
Refactors CoreCLR JIT assertion propagation by splitting the large assertionprop.cpp compilation unit into smaller, more focused units to improve code organization and maintainability.
Changes:
- Added
integralrange.cppcontaining allIntegralRange::*method implementations. - Added
vnbasedmorph.cppcontaining VN-based folding/constant-prop and related visitors/helpers. - Reduced
assertionprop.cppto the remaining assertion propagation infrastructure and updatedCMakeLists.txtto compile the new units.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/coreclr/jit/vnbasedmorph.cpp | New compilation unit for VN-based folding and VN-driven assertion propagation. |
| src/coreclr/jit/integralrange.cpp | New compilation unit for IntegralRange implementation details. |
| src/coreclr/jit/assertionprop.cpp | Removes code moved into the new compilation units; retains assertion propagation core. |
| src/coreclr/jit/CMakeLists.txt | Registers the new .cpp files in the JIT build. |
|
Does |
good point, let me do it by hands to ensure that |
Description
Split
assertionprop.cpp(6321 lines) into three focused compilation units for better code organization.Changes
integralrange.cpp (596 lines): All
IntegralRange::*methodsvnbasedmorph.cpp (1040 lines): VN-based optimization functions
optVNBasedFold*family (memset/memmove unrolling, expression folding)optIsProfitableToSubstitute,optVNConstantPropOnJTrueoptVNAssertionPropCurStmt*assertion propagationVNAssertionPropVisitorInfostructassertionprop.cpp (4722 lines): Remaining assertion propagation infrastructure
AssertionPropFlowCallbackdataflow analysisoptComputeAssertionGen,optAssertionPropMainUpdated
CMakeLists.txtto register new compilation units.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.