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

[SR-13509] Mangle derivative generic signature requirements for derivative functions #53607

Closed
dan-zheng opened this issue Jul 25, 2019 · 1 comment
Assignees

Comments

@dan-zheng
Copy link
Collaborator

Previous ID SR-13509
Radar None
Original Reporter @dan-zheng
Type Sub-task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s
Labels Sub-task
Assignee @dan-zheng
Priority Medium

md5: 5dfb51d4e7dbd1dfb9ccd2d5847a8328

Parent-Task:

  • SR-13506 [AD] Use principled mangling for AD-generated symbols

blocks:

  • TF-482 [AD] Change logic for "generic requirements are not met" error

relates to:

  • TF-1037 [AD] Crash for @differentiable + @derivative attributes with different derivative generic signatures
  • TF-1056 differentiable class method override logic might need to check generic requrirements

Issue Description:

Mangle derivative generic signature requirements for derivative functions:

  • ASTMangler::mangleAutoDiffLinearMapHelper

  • ASTMangler::mangleAutoDiffDerivativeFunctionHelper

  • Add generic signature to AutoDiffDerivativeFunctionIdentifier.

This resolves name collision issues for derivative functions that have the same parameter indices but different generic signatures (TF-1037).
This also enables uniquing @differentiable and @derivative attributes based on generic signatures, not just parameter indices, during type-checking.

@dan-zheng
Copy link
Collaborator Author

Done in #28699.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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

No branches or pull requests

1 participant