Skip to content

[WIP] Dead-code eliminate unused boxes runtime methods #4142

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lolgab
Copy link
Contributor

@lolgab lolgab commented Jan 3, 2025

scala.scalanative.runtime.Boxes and scala.runtime.BoxesRunTime were kept regardless of usage.
This treats them as any other object by reaching their methods when a nir.Op.Box or nir.Op.Unbox operation happens.

`scala.scalanative.runtime.Boxes` and `scala.runtime.BoxesRunTime`
were kept regardless of usage.
This treats them as any other object by reaching their methods when
a `nir.Op.Box` or `nir.Op.Unbox` operation happens.
@lolgab lolgab changed the title Dead-code eliminate unused boxes runtime methods [WIP] Dead-code eliminate unused boxes runtime methods Jan 3, 2025
@lolgab
Copy link
Contributor Author

lolgab commented Jan 3, 2025

It is harder than I thought since we materialize Boxes calls after the first Reach phase (sometimes after the second) and checking for nir.Op.Box/Unbox is not enough to cover all the cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant