Skip to content

Clear the mi_globals field when generating an iface #3414

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

Merged
merged 5 commits into from
Dec 21, 2022

Conversation

wz1000
Copy link
Collaborator

@wz1000 wz1000 commented Dec 20, 2022

GHC populates the mi_global field in interfaces for GHCi if we are using the bytecode
interpreter.
However, this field is expensive in terms of heap usage, and we don't use it in HLS
anywhere. So we zero it out.
The field is not serialized or deserialised from disk, so we don't need to remove it
while reading an iface from disk, only if we just generated an iface in memory

@wz1000 wz1000 requested a review from pepeiborra as a code owner December 20, 2022 12:56
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wz1000 wz1000 force-pushed the wip/clear_mi_globals branch from e35028f to 3395615 Compare December 20, 2022 17:48
GHC populates the mi_global field in interfaces for GHCi if we are using the bytecode
interpreter.
However, this field is expensive in terms of heap usage, and we don't use it in HLS
anywhere. So we zero it out.
The field is not serialized or deserialised from disk, so we don't need to remove it
while reading an iface from disk, only if we just generated an iface in memory
@wz1000 wz1000 force-pushed the wip/clear_mi_globals branch from 2012170 to 8efbf77 Compare December 21, 2022 09:13
@wz1000 wz1000 added the merge me Label to trigger pull request merge label Dec 21, 2022
@wz1000 wz1000 enabled auto-merge (rebase) December 21, 2022 12:33
@wz1000 wz1000 disabled auto-merge December 21, 2022 17:06
@mergify mergify bot merged commit 3b05bde into master Dec 21, 2022
@wz1000 wz1000 mentioned this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants