Add a copy_block_without_escaping %block withoutEscaping %closure instruction

Mandatory pass will clean it up and replace it by a copy_block and
is_escaping/cond_fail/release combination on the %closure in follow-up
patches.

The instruction marks the dependence of a block on a closure that is
used as an 'withoutActuallyEscaping' sentinel.

rdar://39682865
This commit is contained in:
Arnold Schwaighofer
2018-04-25 16:01:34 -07:00
parent c45d659e1f
commit 678a99e76a
18 changed files with 138 additions and 2 deletions

View File

@@ -398,6 +398,7 @@ InlineCost swift::instructionInlineCost(SILInstruction &I) {
case SILInstructionKind::CondBranchInst:
case SILInstructionKind::CondFailInst:
case SILInstructionKind::CopyBlockInst:
case SILInstructionKind::CopyBlockWithoutEscapingInst:
case SILInstructionKind::CopyAddrInst:
case SILInstructionKind::RetainValueInst:
case SILInstructionKind::RetainValueAddrInst: