Skip to content

Add edge kind for access to non-explicit partitioned bindings #57009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 9, 2025

Our binding partion invalidation code scans the original source for any GlobalRefs that need to be invalidated. However, this is not the only source of access to binding partitions. Various intrinsics (in particular the *global ones) also operate on bindings. Since these are not manifest in the source, we instead use the existing edges mechanism to give them forward edges.

This PR only includes the basic info type, and validation in the replacement case. There's a bit more work to do there, but I'm waiting on #56499 for that part, precompilation in particular.

Our binding partion invalidation code scans the original source
for any GlobalRefs that need to be invalidated. However, this
is not the only source of access to binding partitions. Various
intrinsics (in particular the `*global` ones) also operate on
bindings. Since these are not manifest in the source, we instead
use the existing `edges` mechanism to give them forward edges.

This PR only includes the basic info type, and validation in the
replacement case. There's a bit more work to do there, but I'm
waiting on #56499 for that part, precompilation in particular.
@Keno Keno force-pushed the kf/implicitedges branch from 42080a8 to 6448ad8 Compare January 10, 2025 01:10
@Keno
Copy link
Member Author

Keno commented Jan 10, 2025

I'm gonna merge this since it passes CI and has some bug fixes for this code that are causing trouble on CI (#57007). It's not super useful without the extra post-#56499 work, but at least the bug fixes can go in.

@Keno Keno merged commit 9211a93 into master Jan 10, 2025
7 checks passed
@Keno Keno deleted the kf/implicitedges branch January 10, 2025 17:44
aviatesk added a commit to JuliaDebug/Cthulhu.jl that referenced this pull request Jan 28, 2025
aviatesk added a commit that referenced this pull request Jan 28, 2025
`bpart`s there are all known to be `Core.BindingPartition` and never be
`nothing`.
aviatesk added a commit that referenced this pull request Jan 28, 2025
`bpart`s there are all known to be `Core.BindingPartition` and never be
`nothing`.
Keno added a commit that referenced this pull request Jan 31, 2025
This PR adds limited backedge support for Bindings. There are two classes
of bindings that get backedges:

1. Cross-module `GlobalRef` bindings (new in this PR)
2. Any globals accesses through intrinsics (i.e. those with forward edges from #57009)

This is a time/space trade-off for invalidation. As a result of the
first category, invalidating a binding now only needs to scan all the
methods defined in the same module as the binding. At the same time,
it is anticipated that most binding references are to bindings in the
same module, keeping the list of bindings that need explicit (back)edges
small.
Keno added a commit that referenced this pull request Feb 1, 2025
This PR adds limited backedge support for Bindings. There are two classes
of bindings that get backedges:

1. Cross-module `GlobalRef` bindings (new in this PR)
2. Any globals accesses through intrinsics (i.e. those with forward edges from #57009)

This is a time/space trade-off for invalidation. As a result of the
first category, invalidating a binding now only needs to scan all the
methods defined in the same module as the binding. At the same time,
it is anticipated that most binding references are to bindings in the
same module, keeping the list of bindings that need explicit (back)edges
small.
Keno added a commit that referenced this pull request Feb 2, 2025
This PR adds limited backedge support for Bindings. There are two classes
of bindings that get backedges:

1. Cross-module `GlobalRef` bindings (new in this PR)
2. Any globals accesses through intrinsics (i.e. those with forward edges from #57009)

This is a time/space trade-off for invalidation. As a result of the
first category, invalidating a binding now only needs to scan all the
methods defined in the same module as the binding. At the same time,
it is anticipated that most binding references are to bindings in the
same module, keeping the list of bindings that need explicit (back)edges
small.
Keno added a commit that referenced this pull request Feb 2, 2025
This PR adds limited backedge support for Bindings. There are two
classes of bindings that get backedges:

1. Cross-module `GlobalRef` bindings (new in this PR)
2. Any globals accesses through intrinsics (i.e. those with forward
edges from #57009)

This is a time/space trade-off for invalidation. As a result of the
first category, invalidating a binding now only needs to scan all the
methods defined in the same module as the binding. At the same time, it
is anticipated that most binding references are to bindings in the same
module, keeping the list of bindings that need explicit (back)edges
small.
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
…ang#57009)

Our binding partion invalidation code scans the original source for any
GlobalRefs that need to be invalidated. However, this is not the only
source of access to binding partitions. Various intrinsics (in
particular the `*global` ones) also operate on bindings. Since these are
not manifest in the source, we instead use the existing `edges`
mechanism to give them forward edges.

This PR only includes the basic info type, and validation in the
replacement case. There's a bit more work to do there, but I'm waiting
on JuliaLang#56499 for that part, precompilation in particular.
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
This PR adds limited backedge support for Bindings. There are two
classes of bindings that get backedges:

1. Cross-module `GlobalRef` bindings (new in this PR)
2. Any globals accesses through intrinsics (i.e. those with forward
edges from JuliaLang#57009)

This is a time/space trade-off for invalidation. As a result of the
first category, invalidating a binding now only needs to scan all the
methods defined in the same module as the binding. At the same time, it
is anticipated that most binding references are to bindings in the same
module, keeping the list of bindings that need explicit (back)edges
small.
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