-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Labels
-ZpolymorphizeUnstable option: Polymorphization.Unstable option: Polymorphization.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
- 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
MolotovCherry and ajwernerMolotovCherrymatthiaskrgr, zirconium-n and MolotovCherry
Metadata
Metadata
Assignees
Labels
-ZpolymorphizeUnstable option: Polymorphization.Unstable option: Polymorphization.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.