-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Allow optimizer to depend on preloaded symbols #15021
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
Allow optimizer to depend on preloaded symbols #15021
Conversation
I double checked, and we can not assume that The flag is added on all symbols compiled during preloading, including ones that are not always added to the persistent symbol tables. This example will generate bad code. When running with However, symbols in Edit: updated example (missing file) |
Thanks you Arnaud. I'll look into this more then. |
I think it makes sense to check for both - |
09ecf7d
to
7e6fefe
Compare
It is safe for the optimizer to rely on preloaded symbols. This can occur when compiling non-preloaded files, referencing preloaded ones.
7e6fefe
to
2c18a3c
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!
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves mutating the callee, which we don't want to do for functions not coming from the script, especially because the call graph is released later on. Fixes phpGH-15490
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves adding the function to the caller list of the callee, which we don't want to do for functions not coming from the script, given that call graphs are temporary. Fixes phpGH-15490
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves adding the function to the caller list of the callee, which we don't want to do for functions not coming from the script. Fixes phpGH-15490
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves adding the function to the caller list of the callee, which we don't want to do for functions not coming from the script. Fixes phpGH-15490
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves adding the function to the caller list of the callee, which we don't want to do for functions not coming from the script. Fixes phpGH-15490
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves adding the function to the caller list of the callee, which we don't want to do for functions not coming from the script. Fixes phpGH-15490
This issue was introduced in phpGH-15021. When building the call graph, we can now see preloaded functions. However, building the call graph involves adding the function to the caller list of the callee, which we don't want to do for functions not coming from the script. Fixes phpGH-15490
It is safe for the optimizer to rely on preloaded symbols from other files. This can occur when compiling non-preloaded files, referencing preloaded ones.