Open
Description
openedon May 10, 2024
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
- see the issues tagged -Zpolymorphize.
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
- Initial PR: Polymorphization #69749
- lots of follow-ups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment