-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[frontend] Don't destroy the compiler instance object inside performCompile() #9260
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
[frontend] Don't destroy the compiler instance object inside performCompile() #9260
Conversation
…ompile() This permits continuing to use the diagnostic engine object from the instance.
@swift-ci smoke test |
It would be cleaner to construct the diagnostic engine outside of the compiler instance and pass it in to the instance. Then you can still destroy the entire compiler instance. |
Does it have any impact on the memory consumption? In general, we tried to free the memory occupied by the compiler ASAP, to reduce the peak memory usage. |
A previous suggestion was to have |
@swiftix , the commit still frees the ASTContext and SILModule object, which should account for the vast majority of the memory consumption. |
@swift-ci smoke test |
cc @mxswd |
I will try to get a build with this change to evaluate the difference in peak memory usage before merging. |
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, but let's see what Maxwell finds
I've double checked and it looks great to me! Thanks! |
This permits continuing to use the diagnostic engine object from the instance.