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

Add command to list/sort by monomorphizations #6

Closed
fitzgen opened this issue Feb 16, 2018 · 0 comments
Closed

Add command to list/sort by monomorphizations #6

fitzgen opened this issue Feb 16, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed mentored

Comments

@fitzgen
Copy link
Member

fitzgen commented Feb 16, 2018

  • I want to be able to investigate monomorphizations of generic functions
    • list generic functions by the total code size of all of their monomorphizations
    • how many times was this generic function monomorphized?
    • how much space would I save if I switched to dynamic dispatch and trait objects for this generic function instead of monomorphization?

We can implement this by inspecting the demangled symbol for an IR node and extracting the generic function that it is a monomorphization of (if any) and storing that in the IR nodes as well. Then we would have a new analysis that groups IR nodes by the genric function they're monomorphizations of, and sort by most monomorphizations. Finally, we would expose it on the CLI as

$ svelte monos ...
@fitzgen fitzgen added enhancement New feature or request help wanted Extra attention is needed mentored labels Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed mentored
Projects
None yet
Development

No branches or pull requests

1 participant