Skip to content

Tracking Issue for polymorphization #124962

Open

Description

This is a tracking issue for polymorphization (-Zpolymorphize).

Current (2024-05) status:

  • no one has worked on it for 4 years yes
  • It mostly works, but there are some bugs remaining where it incorrectly polymorphizes
  • the current implementation is very limited and not really useful
  • @lcnr wants to remove the current implementation and replace it with a different approach

Open problems

Unresolved Questions

  • Does this in any way interact with which code gets monomorphized? For fully monomorphic functions, we sometimes monomorphize and codegen them for no good reason (see here or here). This is very hard to avoid, but it would be good to limit this to fully monomorphic functions. So even with polymorphization, ideally we will not generate code (and evaluate constants) for any function that's not already considered by the collector. Currently, it seems like everything is fine here, but we should have an eye on this.

Implementation history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    -ZpolymorphizeUnstable option: Polymorphization.C-tracking-issueCategory: A tracking issue for an RFC or an unstable feature.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions