Skip to content

Commit 09f6f4f

Browse files
committed
AutodiffClosureSpecialization: workaround a problem with OSSA.
Disable the closure specializer optimization for closures in OSSA until the underlying problem is fixed. #78847 Part of rdar://140229560
1 parent 9796d1b commit 09f6f4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ClosureSpecialization.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,12 @@ private func handleApplies(for rootClosure: SingleValueInstruction, callSiteMap:
503503
continue
504504
}
505505

506+
// Workaround for a problem with OSSA: https://github.com/swiftlang/swift/issues/78847
507+
// TODO: remove this if-statement once the underlying problem is fixed.
508+
if callee.hasOwnership {
509+
continue
510+
}
511+
506512
if callee.isDefinedExternally {
507513
continue
508514
}

0 commit comments

Comments
 (0)