swift icon indicating copy to clipboard operation
swift copied to clipboard

[Autodiff][sil-optimizer] Modifies handling of differentiable functions in closure-lifetime-fixup pass

Open jkshtj opened this issue 1 year ago • 4 comments

This commit modifies the closure-lifetime-fixup pass to skip fixing up closure-lifetimes for differentiable functions derived from thin_to_thick_function instructions. Such closures should be trivial and should not necessitate lifetime fixups as they do not capture any values.

Fixes https://github.com/apple/swift/issues/71510.

jkshtj avatar Apr 22 '24 20:04 jkshtj

@swift-ci please test

jkshtj avatar Apr 22 '24 20:04 jkshtj

@atrick This is a more near-term fix for the issue we were discussing here. Could you please take a look?

P.S. - I would still like to try and fix the core issues in SILGen, however, because the work is non-trivial I think Swift Autodiff could benefit from this change in the meanwhile.

jkshtj avatar Apr 22 '24 20:04 jkshtj

@swift-ci please test macos

jkshtj avatar Apr 23 '24 14:04 jkshtj

@atrick quick ping about this PR. Could you please take a look?

jkshtj avatar Apr 30 '24 16:04 jkshtj

@swift-ci test Windows

jkshtj avatar May 14 '24 20:05 jkshtj

preset=buildbot,tools=RA,stdlib=DA @swift-ci please test with preset

asl avatar May 14 '24 22:05 asl

@swift-ci please test

jkshtj avatar May 28 '24 21:05 jkshtj

@swift-ci please test macos

jkshtj avatar May 29 '24 03:05 jkshtj

@atrick I've made some quick changes based on your feedback. Can you take a look now?

jkshtj avatar May 29 '24 15:05 jkshtj