Skip to content

Commit 87a9d4c

Browse files
committed
Optimizer: notify that operand instructions of a deleted instruction have changed
This makes sure that instruction simplification doesn't terminate too early, missing some optimization opportunities.
1 parent ffc3fb0 commit 87a9d4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SwiftCompilerSources/Sources/SIL/Context.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ extension MutatingContext {
169169
}
170170
notifyInstructionsChanged()
171171

172+
for operand in instruction.operands {
173+
if let opInst = operand.value.definingInstruction {
174+
notifyInstructionChanged(opInst)
175+
}
176+
}
177+
172178
_bridged.eraseInstruction(instruction.bridged, salvageDebugInfo)
173179
}
174180

0 commit comments

Comments
 (0)