BE-494: HashQL: Loop-breaker selection for recursive inlining#8600
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## bm/be-482-hashql-remove-logical-not-from-unary-operators #8600 +/- ##
============================================================================================
+ Coverage 62.88% 63.35% +0.47%
============================================================================================
Files 1379 1385 +6
Lines 141785 144511 +2726
Branches 5844 5912 +68
============================================================================================
+ Hits 89156 91551 +2395
- Misses 51695 51990 +295
- Partials 934 970 +36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance
Comparing Footnotes
|
51195eb to
d6dbdd5
Compare
f66d5ce to
b4e6aaf
Compare
|
Deployment failed with the following error: |
933ed9e to
1bebdcc
Compare
68d7a83 to
1685178
Compare
1cba715 to
1da0f0a
Compare
PR SummaryMedium Risk Overview Integrates loop-breaker selection into the MIR inliner: computes SCC members, scores SCC functions, greedily selects breaker functions to make the SCC remainder acyclic, reorders SCC members (non-breakers in postorder, breakers last), and updates both normal and aggressive inlining to inline within SCCs except when targeting a selected breaker (and to skip self-calls). Extends supporting APIs ( Reviewed by Cursor Bugbot for commit c230af9. Bugbot is set up for automated code reviews on this repo. Configure here. |
1c91f7b to
84e917d
Compare
1da0f0a to
979bf1e
Compare
🤖 Augment PR SummarySummary: Adds loop-breaker-aware inlining for mutually recursive HashQL MIR functions, enabling safe inlining within recursive SCCs without infinite expansion. Changes:
Technical Notes: Breaker selection uses repeated cycle checks over the remaining subgraph (filtered via DFS edge ignoring) to ensure the non-breaker remainder is acyclic before allowing within-SCC inlining. 🤖 Was this summary useful? React with 👍 or 👎 |
84e917d to
d7a892b
Compare
979bf1e to
3fe9df4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4ea12a3. Configure here.


🌟 What is the purpose of this PR?
This PR implements a three-color depth-first search algorithm for directed graphs and integrates it with a loop-breaker selection system for the MIR inliner. The three-color DFS enables cycle detection and postorder traversal, while the loop-breaker system allows the inliner to handle mutually recursive functions by strategically selecting which functions to avoid inlining within strongly connected components (SCCs).
🔗 Related links
🔍 What does this change?
libs/@local/hashql/core/src/graph/algorithms/color/mod.rswith support for cycle detection and visitor callbackslibs/@local/hashql/mir/src/pass/transform/inline/loop_breaker.rsthat uses scoring heuristics to choose which functions in recursive SCCs should not be inlined!to~in MIR output formattingInlineLoopBreakerConfigfor tuning breaker selection heuristicsPre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
❓ How to test this?