BE-372: HashQL: Add traversal-aware liveness analysis for optimizing entity projections#8363
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR SummaryMedium Risk Overview Wires this traversal-aware liveness into Written by Cursor Bugbot for commit 61a2ae7. This will update automatically on new commits. Configure here. |
Merging this PR will not alter performance
Comparing Footnotes
|
🤖 Augment PR SummarySummary: This PR adds traversal-aware liveness analysis to better optimize and cost entity projection traversals in HashQL MIR. Changes:
Technical Notes: The skip behavior only triggers for 🤖 Was this summary useful? React with 👍 or 👎 |
libs/@local/hashql/mir/tests/ui/pass/liveness/traversal_assignment_skips_source.snap
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## bm/be-304-hashql-terminator-coloring-based-on-capabilities #8363 +/- ##
==============================================================================================
+ Coverage 84.09% 84.15% +0.05%
==============================================================================================
Files 346 346
Lines 51637 51845 +208
Branches 1319 1324 +5
==============================================================================================
+ Hits 43423 43629 +206
Misses 7744 7744
- Partials 470 472 +2
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:
|
c04d28b to
49dcd92
Compare
71d18d4 to
45b6a75
Compare
49dcd92 to
76697d7
Compare
45b6a75 to
54da85f
Compare
54da85f to
be8a448
Compare
76697d7 to
4298d22
Compare
4298d22 to
9a0ea84
Compare
be8a448 to
61a2ae7
Compare

🌟 What is the purpose of this PR?
This PR adds a traversal-aware liveness analysis that suppresses uses of traversal source locals when assigning to known traversal destinations. This allows dead code elimination to remove source locals when all their uses are through extracted traversals.
🔍 What does this change?
TraversalLivenessAnalysisthat extends standard liveness analysis with special handling for traversal extractionTerminatorPlacementto use the traversal-aware liveness analysisTraversalsto check if a local is a traversal destinationPre-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?
TraversalLivenessAnalysiscovering various scenariosTerminatorPlacementtests to use the new analysis