-
-
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
Add edges
vector to CodeInstance/CodeInfo to keep backedges as edges
#54894
base: master
Are you sure you want to change the base?
Conversation
af946a0
to
0277c82
Compare
af03fd5
to
91be20b
Compare
91be20b
to
ce5726f
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
ce5726f
to
d2c2e51
Compare
Given that this is now a pure regression size-wise, can the description be updated to more clearly explain why this PR is a good thing? |
2f824bf
to
33701f1
Compare
I'm working on rebasing this. |
33701f1
to
4525784
Compare
a7aae3c
to
c83f06d
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
c83f06d
to
bfed3fe
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
a9c4eeb
to
fe8d042
Compare
a5a2db9
to
6f64fd6
Compare
52efd2b
to
2ecae72
Compare
This records all invoke targets as edges as a functionality test, before finishing the implementation of recording the edges accurately during inference (via backedges + inference).
Start computing edges from stmt_info later (after CodeInstance is able to have been allocated for recursion) instead of immediately.
To avoid calling `add_edges!` directly. In fact, it might be better to define something like `VirtualizedCallInfo` rather than using `MethodResultPure`.
2ecae72
to
3b57317
Compare
Now we have these remaining TODOs for the Julia-side refactoring:
|
Remaining TODOs: - Finalize the format for `sv.edges`. There might be cases where no `edge::CodeInstance` exists as a result of `abstract_call_method`, and in such cases, we might still need to use `MethodInstance` in the `edges` list. - Ensure that when the local caching mode is specified (i.e. for const-prop'ed calls and call-site-inlined calls), the const-propped edge should be propagated instead of the regular edge. - Make use of the `CodeInstance` held by `CallInfo` during inlining for slightly better performance by avoiding the global cache lookup.
3b57317
to
a6e7b20
Compare
Appears to add about
1MB3MB (117MB to 120MB) to the system image, and to decrease the stdlib size by2MB54 MB (305MB to 251MB), so seems overall favorable right now. The edges arenotbeing computedyetfollowing the encoding https://hackmd.io/sjPig55kS4a5XNWC6HmKSg?both#Edges-Encoding to correctly reflect the backedgesbut they currently are just extracting the.:invoke
fieldsTODO: we currently store 2 copies of the edges during serialization (in both the svec and the old format) which should help recover a portion of the overhead for the stdlibs.TODO: this records edges only to the MI, not to the recursive edges (as required for correctness)