Skip to content

Commit

Permalink
Merge pull request swiftlang#39059 from eeckstein/fix-perf-regressions
Browse files Browse the repository at this point in the history
COWOpts: handle debug_value instructions
  • Loading branch information
eeckstein authored Aug 26, 2021
2 parents 5357a1d + ec67d1b commit 9de5d6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/SILOptimizer/Transforms/COWOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions test/SILOptimizer/cow_opts.sil
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sil @test_simple : $@convention(thin) (@owned Buffer) -> (Int, Builtin.Int1, @ow
bb0(%0 : $Buffer):
%e = end_cow_mutation %0 : $Buffer
%addr = ref_element_addr [immutable] %e : $Buffer, #Buffer.i
debug_value %e : $Buffer, var, name "x"
%i = load %addr : $*Int
(%u, %b) = begin_cow_mutation %e : $Buffer
%t = tuple (%i : $Int, %u : $Builtin.Int1, %b : $Buffer)
Expand Down

0 comments on commit 9de5d6e

Please sign in to comment.