Support differentiation of `is` and `as?` operators.
These operators lower to branching cast SIL instructions, requiring control
flow differentiation support.
Resolves SR-12898.
The derivative wrt `self` should drop the last element from the incoming seed.
Example:
- Incoming seed: [1, 2, 3, 4]
- Derivative wrt `self`: [1, 2, 3]
- Derivative wrt appended element: 4
Add special-case VJP generation support for "semantic member accessors".
This is necessary to avoid activity analysis related diagnostics and simplifies
generated code.
Fix "wrapped property mutability" check in `Differentiable` derived conformnances.
This resolves SR-12642.
Add e2e test using real world property wrappers (`@Lazy` and `@Clamping`).
Support differentiation of property wrapper wrapped value getters and setters.
Create new pullback generation code path for "semantic member accessors".
"Semantic member accessors" are attached to member properties that have a
corresponding tangent stored property in the parent `TangentVector` type.
These accessors have special-case pullback generation based on their semantic
behavior. Currently, only getters and setters are supported.
This special-case pullback generation is currently used for stored property
accessors and property wrapper wrapped value accessors. In the future, it can
also be used to support `@differentiable(useInTangentVector)` computed
properties: SR-12636.
User-defined accesors cannot use this code path because they may use custom
logic that does not semantically perform a member access.
Resolves SR-12639.
`partial_apply` can be rewritten to `thin_to_thick_function` only if the
specialized callee is `@convention(thin)`.
This condition is newly exercised by the differentiation transform:
`{JVP,VJP}Emitter::visitApplyInst` generates argument-less `partial_apply`
with `@convention(method)` callees.
Resolves SR-12732.
Support `@differentiable` function conversion for `init` references, in
addition to `func` references and literal closures. Minor usability improvement.
Resolves SR-12562.
The name of the module is encoded into the type name. The module name
is not `null` on Windows, which would fail to match the name. It is
possible to make the test less overly-constricted, but setting the
module name to null is simpler and avoids more regex matching.
Support `@differentiable` function conversion for `init` references, in
addition to `func` references and literal closures. Minor usability improvement.
Resolves SR-12562.