Skip to content

Add forward edges and callgraph - #61

Merged
timholy merged 3 commits into
masterfrom
teh/forwardedges
Aug 18, 2026
Merged

Add forward edges and callgraph#61
timholy merged 3 commits into
masterfrom
teh/forwardedges

Conversation

@timholy

@timholy timholy commented Aug 18, 2026

Copy link
Copy Markdown
Owner

This provides convenience utilities to extract the callgraph given an entry point.

`direct_calls` decodes `CodeInstance.edges` into `CallEdge`s, and
`visit_calls`, `all_calls`, and `callgraph` walk them from one or more
entry points. Together they give the caller-to-callee direction that
complements the existing backedge traversal.

Because these edges are recorded before optimization, callees that were
inlined are still listed, and a call site dispatched at run time
contributes one edge per applicable method. A call site whose function
is typed merely as `Function` leaves no edge at all.

Inference records these edges only on Julia 1.12 and later, so
`direct_calls` reports that requirement as an error on older versions.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
@timholy
timholy merged commit 8b4e7af into master Aug 18, 2026
11 of 14 checks passed
@timholy
timholy deleted the teh/forwardedges branch August 18, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant