Skip to content

Conversation

@WardBrian
Copy link
Member

This took @SteveBronder's idea from #1353 and ported it to the current compiler. I've already found myself using it a couple times to help people on the forums, so it seems like a good idea to expose.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

--debug-mem-patterns will now output information about why each variable was not considered a candidate for the SoA optimization.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian added interface command line interface optimization labels Oct 24, 2025
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 92.53731% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.28%. Comparing base (bc48709) to head (d345b4c).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
src/analysis_and_optimization/Memory_patterns.ml 92.06% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1566   +/-   ##
=======================================
  Coverage   90.28%   90.28%           
=======================================
  Files          65       65           
  Lines        9993    10038   +45     
=======================================
+ Hits         9022     9063   +41     
- Misses        971      975    +4     
Files with missing lines Coverage Δ
src/analysis_and_optimization/Optimize.ml 92.44% <100.00%> (-0.02%) ⬇️
src/driver/Entry.ml 96.20% <100.00%> (+0.09%) ⬆️
src/analysis_and_optimization/Memory_patterns.ml 89.52% <92.06%> (+0.21%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@SteveBronder SteveBronder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one major comment about deduping the printed warnings. It would be nice to make the warnings a little more fleshed out / actionable, but I did not do that in the original branch. If it is not too much effort to make the warnings a little nicer that would be nice. But that is optional.

Comment on lines 10039 to 10040
SoA (Line 46) warning: Right hand side contains only AoS expressions: p_aos_mat_pass_func_outer_single_indexed2
SoA (Line 45) warning: Right hand side contains only AoS expressions: p_aos_mat_pass_func_outer_single_indexed1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to make a separate issue to figure out if this should fail now because of something we turned off. But I think the answer is yet to be conservative. Should probably change the name to fail

@WardBrian
Copy link
Member Author

@SteveBronder I deduplicated the warnings and added some more information where it was easy to do so -- I think this can be something we tweak and improve over time

Copy link
Contributor

@SteveBronder SteveBronder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! One last thing that is optional. Right now the lead for each warning is like the following

SoA (Line 13) warning:

I think we could do something like the following to make it a little more clear what these lines mean

(Line 13) SoA Optim Pass Demotion Warning: 

Or something that says, "This is a warning with respect to the optimization pass for promoting to SoA. But I'm also fine with it as is

@WardBrian WardBrian merged commit 4f8977e into master Nov 11, 2025
1 check passed
@WardBrian WardBrian deleted the soa-explanations branch November 11, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interface command line interface optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants