mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift SIL: replace the set_deallocating instruction with begin_dealloc_ref
Codegen is the same, but `begin_dealloc_ref` consumes the operand and produces a new SSA value. This cleanly splits the liferange to the region before and within the destructor of a class.
This commit is contained in:
@@ -263,7 +263,7 @@ static bool canZapInstruction(SILInstruction *Inst, bool acceptRefCountInsts,
|
||||
isa<MoveValueInst>(Inst)) {
|
||||
return true;
|
||||
}
|
||||
if (isa<SetDeallocatingInst>(Inst) || isa<FixLifetimeInst>(Inst) ||
|
||||
if (isa<BeginDeallocRefInst>(Inst) || isa<FixLifetimeInst>(Inst) ||
|
||||
isa<EndBorrowInst>(Inst))
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user