COWOpts: handle debug_value instructions

Don't let debug_value instructions bail the optimization.

This fixes a couple of performance regressions, which were introduced by adding more debug_value instructions (https://github.com/apple/swift/pull/38736).

rdar://82327743
This commit is contained in:
Erik Eckstein
2021-08-26 13:54:26 +02:00
parent 0a0926ba7a
commit ec67d1bc5a
2 changed files with 2 additions and 0 deletions

View File

@@ -247,6 +247,7 @@ void COWOptsPass::collectEscapePoints(SILValue v,
case SILInstructionKind::BeginCOWMutationInst:
case SILInstructionKind::RefElementAddrInst:
case SILInstructionKind::RefTailAddrInst:
case SILInstructionKind::DebugValueInst:
break;
case SILInstructionKind::BranchInst:
collectEscapePoints(cast<BranchInst>(user)->getArgForOperand(use),