lineinfo: Avoid _get_lin vector allocation#838
Open
aviatesk wants to merge 1 commit into
Open
Conversation
JET locates report sites by asking `Compiler.IRShow.buildLineInfoNode` and taking the first entry. That helper always allocates a Vector even when `_get_lin` only needs a single LineInfoNode. Walk `Core.DebugInfo` directly in JETBase and track the same update semantics as append_scopes!, including nested linetables, inlining edges, and fallback behavior. Tests in test/test_misc.jl compare `_get_lin` against the old `buildLineInfoNode`-based behavior for direct, indirect, inlined, and invalid debuginfo cases. Co-Authored-By: GPT-5.5 <noreply@openai.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #838 +/- ##
==========================================
+ Coverage 84.05% 84.10% +0.05%
==========================================
Files 12 12
Lines 3160 3190 +30
==========================================
+ Hits 2656 2683 +27
- Misses 504 507 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JET locates report sites by asking
Compiler.IRShow.buildLineInfoNodeand taking the first entry. That helper always allocates aVectoreven when_get_linonly needs a single LineInfoNode.Walk
Core.DebugInfodirectly in JETBase and track the same update semantics as append_scopes!, including nested linetables, inlining edges, and fallback behavior.Tests in test/test_misc.jl compare
_get_linagainst the oldbuildLineInfoNode-based behavior for direct, indirect, inlined, and invalid debuginfo cases.The cost of merging this PR is of course the more dependency on the Compiler internals.