Skip to content

Commit dae0e44

Browse files
committed
[semantic-arc-opts] When eliminating trivially dead insts exposed by eliminating ARC, explicitly mark madeChange true.
Otherwise, on the face of it we do not invalidate analyses as we should. That being said, I do not think we actually could hit this in practice today since a trivially dead instruction can only enter the worklist as a result of us removing some sort of other instruction causing madeChange to be already true. That being said, I would rather not rely on that in the face of future change. Found via site reading code.
1 parent 7ac3338 commit dae0e44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SILOptimizer/Transforms/SemanticARCOpts.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ bool SemanticARCOptVisitor::processWorklist() {
491491
if (isInstructionTriviallyDead(defInst)) {
492492
deleteAllDebugUses(defInst);
493493
eraseInstruction(defInst);
494+
madeChange = true;
494495
continue;
495496
}
496497
}

0 commit comments

Comments
 (0)