Skip to content

Commit fec443a

Browse files
committed
Run AutoDiff closure specialization for all VJPs and not only single BB ones
1 parent c58788a commit fec443a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ClosureSpecialization.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ let autodiffClosureSpecialization = FunctionPass(name: "autodiff-closure-special
122122
(function: Function, context: FunctionPassContext) in
123123

124124
guard !function.isDefinedExternally,
125-
function.isAutodiffVJP,
126-
function.blocks.singleElement != nil else {
125+
function.isAutodiffVJP else {
127126
return
128127
}
129128

0 commit comments

Comments
 (0)