mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add "yield" and "unwind" instructions to SIL.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user