Skip to content

Commit 8a71844

Browse files
committed
Cleanup SIL ComputeSideEffects for partial_apply arguments
1 parent 5e1520e commit 8a71844

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ComputeSideEffects.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ private struct CollectedEffects {
153153
// handleApply above is sufficient. And, if they are not applied
154154
// in this function, then they are never applied.
155155
if !pa.isOnStack {
156-
// the callee and its arguments are all captured...
157-
for operand in pa.operands {
158-
if operand.value.type.isAddress {
159-
addEffects(.read, to: operand.value)
156+
// callee is never an address.
157+
for argument in pa.arguments {
158+
if argument.type.isAddress {
159+
addEffects(.read, to: argument)
160160
}
161161
}
162162
}

0 commit comments

Comments
 (0)