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

Prune unused local functions #427

Merged
merged 2 commits into from
May 4, 2023
Merged

Prune unused local functions #427

merged 2 commits into from
May 4, 2023

Conversation

vbgl
Copy link
Member

@vbgl vbgl commented May 3, 2023

Local functions that are not reachable from any “export” functions are
removed from the program after inlining.

The compiler notoriously exhibits weird behaviors when local functions
are never called.

vbgl added 2 commits May 3, 2023 09:57
The compiler notoriously exhibits weird behaviors when local functions
are never called.
Local functions that are not reachable from any “export” functions are
removed from the program after inlining.
Copy link
Contributor

@eponier eponier left a comment

Choose a reason for hiding this comment

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

Should we issue a warning in some contexts? (Unused function f or the like)

@vbgl
Copy link
Member Author

vbgl commented May 3, 2023

IMHO, that’s a good task for a linter…

@bgregoir bgregoir merged commit b7ad565 into main May 4, 2023
1 check passed
@bgregoir bgregoir deleted the prune-unused-local-functions branch May 4, 2023 14:41
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.

None yet

3 participants