Skip to content
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

Clear the mi_globals field when generating an iface #3414

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

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!

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 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.

None yet

3 participants