Rename OwnershipForwardingMixin -> ForwardingInstruction

This commit is contained in:
Meghana Gupta
2023-06-12 13:25:36 -07:00
parent 2b8a39724c
commit 7cb3733e29
16 changed files with 72 additions and 75 deletions

View File

@@ -526,7 +526,7 @@ eliminateUnneededForwardingUnarySingleValueInst(SingleValueInstruction *inst,
static Optional<SILBasicBlock::iterator>
tryEliminateUnneededForwardingInst(SILInstruction *i,
CanonicalizeInstruction &pass) {
assert(OwnershipForwardingMixin::isa(i) &&
assert(ForwardingInstruction::isa(i) &&
"Must be an ownership forwarding inst");
if (auto *svi = dyn_cast<SingleValueInstruction>(i))
if (svi->getNumOperands() == 1)
@@ -565,7 +565,7 @@ CanonicalizeInstruction::canonicalize(SILInstruction *inst) {
auto *fn = inst->getFunction();
if (!preserveDebugInfo && fn->hasOwnership()
&& fn->getModule().getStage() != SILStage::Raw) {
if (OwnershipForwardingMixin::isa(inst))
if (ForwardingInstruction::isa(inst))
if (auto newNext = tryEliminateUnneededForwardingInst(inst, *this))
return *newNext;
}