-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[Compiler] new approach to verify --trim output #57530
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
Conversation
|
I was in the process or writing this, I have like a third of it done but nice! |
Move all this code into the Compiler julia code, where we have much better utilities for printing and observability for analysis.
b8bb53f to
db6f080
Compare
| const runtime_functions = Symbol[ | ||
| # a denylist of any runtime functions which someone might ccall which can call jl_apply or access reflection state | ||
| # which might not be captured by the trim output | ||
| :jl_apply, |
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 is the list we have in alloc_check that we say can dispatch
"f__apply_latest", "f__apply_iterate", "f__apply_pure", "f__call_latest",
"f__call_in_world", "f__call_in_world_total", "f_intrinsic_call", "f_invoke",
"f_opaque_closure_call", "apply", "apply_generic", "gf_invoke",
"gf_invoke_by_method", "gf_invoke_lookup_worlds", "invoke", "invoke_api",
"call", "call0", "call1", "call2", "call3", "unknown_fptr"
|
The implementation looks quite good. One question I have is about if we can at least check for Tasks |
|
Good call on that. That is the |
|
Reimplement all of the trim verification support in Julia as a compiler analysis pass. Move all this verification code into the Compiler julia code, where we have much better utilities for pretty printing and better observability for analysis. (cherry picked from commit 1045bd8)
As spotted by @Keno in #57530 (comment) (cherry picked from commit a001847)
Reimplement all of the trim verification support in Julia as a compiler analysis pass. Move all this verification code into the Compiler julia code, where we have much better utilities for pretty printing and better observability for analysis.
Reimplement all of the trim verification support in Julia as a compiler analysis pass. Move all this verification code into the Compiler julia code, where we have much better utilities for pretty printing and better observability for analysis.
Or with the whole trimming support: