Skip to content

[AutoDiff] Implement the closure optimization that is specialized towards the linear map tuples / enums produced by autodiff. #68944

@jkshtj

Description

@jkshtj

Subtask of #68901

Implement the closure optimization that is specialized towards the linear map tuples / enums produced by autodiff. In particular, as in example above, if we see the particular closure (partial_apply), then instead of storing the closure in the tuple, store the closed value. And move partial_apply down to the apply site (no need to fold, there are existing passes to do this). And we know the place of use due to the way how the linear map tuples and branch tracing enums are generated.

Metadata

Metadata

Assignees

Labels

AutoDiffSILOptimizerArea → compiler: SIL optimization passesclosuresFeature: closurescompilerThe Swift compiler itselfexpressionsFeature: expressions

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions