-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Reland #57979 (and following #58083 #58082) #58203
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
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
@nanosoldier |
2 similar comments
@nanosoldier |
@nanosoldier |
Interesting to see that this PR has a very strong (positive) impact on system image size, removing roughly 20 MB. |
Is that still the case after 1e6e948? We were compressing more |
Your benchmark job has completed - no performance regressions were detected. A full report can be found here. |
Ah, that's much better. |
Yes, that difference is still visible (I thought that undo should be a no-op anyways), so it might be good to understand why this PR is having such a dramatic effect to make sure it is not discarding something unintentionally. |
EDIT: this is not correct, behavior should be the same as before and not store non-inlineable sources in the code instance; please ignore this comment. |
It is actually caused by a different storage logic for Before these changes, even when we did not keep the optimized @vtjnash Keno and I are not very familiar with the handling of |
@vtjnash can you comment on @serenity4's question above? I'd like to get this merged to unbreak downstream |
The debuginfo is supposed to correspond to the executing code, for use in handling printing stacktraces. Tests are part of this PR if you wanted to have those first: #53925 |
The dataflow here is a bit awkward since the codegen is handled separately and in fact, I believe when codegen actually gets around to updating the pointer in the codeinstance, it also sets debuginfo. I think that might imply it's fine not to set it here? But yes, it'd be good to have some tests. |
Yes, I assume codegen currently might be also change this field, while codegen probably should instead abort if inference made a mistake here, that seemed slightly annoying, so it currently instead silently tries to fix it. |
Does it make sense for inference to set this though? In particular, it seems like (as evidenced by the big size decrease) there are cases where we don't actually end up compiling the code, in which case the debuginfo is never usable by anything. Shouldn't the dataflow for the code and the debuginfo be together? |
Checking the code, codegen relies upon inference having done the correct thing here already, and does not have the assumed ability to fix mistakes |
I don't think that really answers the conceptual question though: Why are these taking different dataflow paths if? |
As a quick experiment, using only the I played with the tests from #53925, behavior remains identical without the added feature in that PR, so in the end I don't think it makes sense to include them. I haven't identified any failure mode for the change to |
The implementation of the tests in #53925 is incomplete, so you will need to finish that first before you can claim victory here. Yes, storing debuginfo is expensive. No, you cannot just simply delete it because it is inconvenient for your PR. The reason the dataflow diverges here is that it splits for several different consumers, including inlining, #53925 WIP, and codegen. Each gets a different copy of a different representation of this metadata. |
Yes, but it's conceptually odd that |
To be clear, it's very straightforward to restore the previous behavior. It's not inconvenient, we're just questioning whether the previous behavior made sense before blindly re-applying it and removing what seems to be a considerable and unexpected gain. The only change required would be to add a branch where if |
…-jn/revert-57979-58083-58082
I reverted to using the previous |
JuliaLang#58203) Reverts JuliaLang#58182. The API changes were intentional and desirable. Let's figure out why nansoldier was upset and re-apply this. --------- Co-authored-by: Cédric Belmant <[email protected]>
JuliaLang#58203) Reverts JuliaLang#58182. The API changes were intentional and desirable. Let's figure out why nansoldier was upset and re-apply this. --------- Co-authored-by: Cédric Belmant <[email protected]>
Reverts #58182. The API changes were intentional and desirable. Let's figure out why nansoldier was upset and re-apply this.