Skip to content

Commit 80051fe

Browse files
committed
MandatoryPerformanceOptimizations: trigger another iteration if dead allocations were removed
1 parent 31f3102 commit 80051fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private func optimize(function: Function, _ context: FunctionPassContext, _ work
111111

112112
// If this is a just specialized function, try to optimize copy_addr, etc.
113113
changed = context.optimizeMemoryAccesses(in: function) || changed
114-
_ = context.eliminateDeadAllocations(in: function)
114+
changed = context.eliminateDeadAllocations(in: function) || changed
115115
}
116116

117117
worklist.add(calleesOf: function)

0 commit comments

Comments
 (0)