Add "yield" and "unwind" instructions to SIL.

This commit is contained in:
John McCall
2017-11-07 03:51:54 -05:00
parent 5c33d2106a
commit 14d6390352
28 changed files with 624 additions and 3 deletions

View File

@@ -291,6 +291,8 @@ void DCE::markTerminatorArgsLive(SILBasicBlock *Pred,
switch (Term->getTermKind()) {
case TermKind::ReturnInst:
case TermKind::ThrowInst:
case TermKind::UnwindInst:
case TermKind::YieldInst:
case TermKind::UnreachableInst:
case TermKind::SwitchValueInst:
@@ -381,6 +383,7 @@ void DCE::propagateLiveness(SILInstruction *I) {
switch (cast<TermInst>(I)->getTermKind()) {
case TermKind::BranchInst:
case TermKind::UnreachableInst:
case TermKind::UnwindInst:
return;
case TermKind::ReturnInst:
@@ -396,6 +399,7 @@ void DCE::propagateLiveness(SILInstruction *I) {
case TermKind::TryApplyInst:
case TermKind::SwitchValueInst:
case TermKind::YieldInst:
for (auto &O : I->getAllOperands())
markValueLive(O.get());
return;