File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
SwiftCompilerSources/Sources/Optimizer/FunctionPasses Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,6 @@ private func collectMovableInstructions(
334
334
movableInstructions. scopedInsts. append ( beginBorrowInst)
335
335
}
336
336
case let fullApplySite as FullApplySite :
337
- // TODO: Use set for this check.
338
337
guard analyzedInstructions. readOnlyApplies. contains ( where: { $0 == fullApplySite } ) else {
339
338
break
340
339
}
@@ -904,16 +903,11 @@ private extension Instruction {
904
903
let copyValue = headerBuilder. createCopyValue ( operand: preheaderLoadBorrow)
905
904
loadCopyInst. replace ( with: copyValue, context)
906
905
907
- var createdEndBorrow : EndBorrowInst ?
908
906
for exitBlock in loop. exitBlocks where !context. deadEndBlocks. isDeadEnd ( exitBlock) {
909
907
assert ( exitBlock. hasSinglePredecessor, " Exiting edge should not be critical. " )
910
908
911
- if let createdEndBorrow {
912
- createdEndBorrow. copy ( before: exitBlock. instructions. first!, context)
913
- } else {
914
- let exitBlockBuilder = Builder ( before: exitBlock. instructions. first!, context)
915
- createdEndBorrow = exitBlockBuilder. createEndBorrow ( of: preheaderLoadBorrow)
916
- }
909
+ let exitBlockBuilder = Builder ( before: exitBlock. instructions. first!, context)
910
+ exitBlockBuilder. createEndBorrow ( of: preheaderLoadBorrow)
917
911
}
918
912
}
919
913
You can’t perform that action at this time.
0 commit comments