mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Intoduce unchecked_ownership instruction in raw SIL
This instruction can be used to disable ownership verification on it's result and will be allowed only in raw SIL. Sometimes SILGen can produce invalid ownership SSA, that cannot be resolved until mandatory passes run. We have a few ways to piecewise disable verification. With unchecked_ownership instruction we can provide a uniform way to disable ownership verification for a value.
This commit is contained in:
@@ -1806,6 +1806,9 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
|
||||
writeOneOperandExtraAttributeLayout(SI.getKind(), Attr, SI.getOperand(0));
|
||||
break;
|
||||
}
|
||||
case SILInstructionKind::UncheckedOwnershipInst: {
|
||||
llvm_unreachable("Invalid unchecked_ownership during serialzation");
|
||||
}
|
||||
case SILInstructionKind::YieldInst: {
|
||||
auto YI = cast<YieldInst>(&SI);
|
||||
SmallVector<ValueID, 4> args;
|
||||
|
||||
Reference in New Issue
Block a user