-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
aot: move jl_insert_backedges
to Julia side
#56499
Conversation
4959411
to
2eafa61
Compare
Does this have any performance diff? |
Moving the implementation to Julia seems to result in a slight increase in allocations, but considering the potential for future improvements, it doesn’t seem like a significant issue julia> @time using Debugger
0.233097 seconds (626.92 k allocations: 33.375 MiB, 26.87% compilation time: 100% of which was recompilation) # master
0.228869 seconds (627.05 k allocations: 33.421 MiB, 27.19% compilation time: 100% of which was recompilation) |
2eafa61
to
718aea8
Compare
907d058
to
6b69260
Compare
7b54cf5
to
87836bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
109748f
to
929d53c
Compare
If #56499 is merged, the functionality of `jl_reinit_ccallable` will become incomplete. However, it is questionable whether `jl_reinit_ccallable` is truly necessary. It seems to have been added in #44527, but all test cases appear to pass without it. Therefore, it might be safe to remove it altogether.
If #56499 is merged, the functionality of `jl_reinit_ccallable` will become incomplete. However, it is questionable whether `jl_reinit_ccallable` is truly necessary. It seems to have been added in #44527, but all test cases appear to pass without it. Therefore, it might be safe to remove it altogether.
929d53c
to
8ed7f7f
Compare
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.
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.
e1c3ce6
to
9340251
Compare
9340251
to
b5d0227
Compare
This should be ready to go. |
b5d0227
to
d9d83a6
Compare
0b2575d
to
2e7b0b2
Compare
@@ -0,0 +1,296 @@ | |||
# This file is a part of Julia. License is MIT: https://julialang.org/license | |||
|
|||
module StaticData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This eventually should be moved inside the Compiler module and locked to the Compiler world age, since broadly speaking this algorithm is just a slightly different re-implementation of that entire code. I guess that isn't blocking though for now, since this is a private module name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move it to Compiler in a separate PR.
With #56447, the dependency between `jl_insert_backedges` and method insertion has been eliminated, allowing `jl_insert_backedges` to be performed after loading. As a result, it is now possible to move `jl_insert_backedges` to the Julia side. Currently this commit simply moves the implementation without adding any new features.
Co-authored-by: Jameson Nash <[email protected]>
d427164
to
6e8bd6b
Compare
With #56447, the dependency between
jl_insert_backedges
and method insertion has been eliminated, allowingjl_insert_backedges
to be performed after loading. As a result, it is now possible to movejl_insert_backedges
to the Julia side.Currently this commit simply moves the implementation without adding any new features.