Files
Daniil Kovalev 6f3906ac6b [AutoDiff][SILOptimizer] Support differentiable_function specialization (#91950)
When the original function, JVP, and VJP are statically known, create a
specialized version of the callee with these components propagated into
its body. It allows SILCombiner to fold
`differentiable_function_extract` of `differentiable_function`. The
differentiable function parameter is removed from the specialized
function signature, and call sites are updated accordingly.

```
// caller:
  %df = differentiable_function [parameters 0] [results 0] %f with_derivative {%jvp, %vjp}
  %r = apply %callee(%x, %df)

// callee(%x, %df):
  %v = differentiable_function_extract [vjp] %df
  %r = apply %v(%x)

// -->

// caller:
  %r = apply %specialized_callee(%x)

// specialized_callee(%x):
  %df = differentiable_function [parameters 0] [results 0] %f with_derivative {%jvp, %vjp}
  %v = differentiable_function_extract [vjp] %df
  %r = apply %v(%x)
```
2026-11-10 18:03:25 +00:00
..