mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
- `Mangle::ASTMangler::mangleAutoDiffDerivativeFunction()` and `Mangle::ASTMangler::mangleAutoDiffLinearMap()` accept original function declarations and return a mangled name for a derivative function or linear map. This is called during SILGen and TBDGen. - `Mangle::DifferentiationMangler` handles differentiation function mangling in the differentiation transform. This part is necessary because we need to perform demangling on the original function and remangle it as part of a differentiation function mangling tree in order to get the correct substitutions in the mangled derivative generic signature. A mangled differentiation function name includes: - The original function. - The differentiation function kind. - The parameter indices for differentiation. - The result indices for differentiation. - The derivative generic signature.
28 KiB
28 KiB