Update and add new apis on ForwardingInstruction

This commit is contained in:
Meghana Gupta
2023-06-12 23:00:43 -07:00
parent 43b20ca3d8
commit 6df7ebbb4e
8 changed files with 107 additions and 62 deletions

View File

@@ -1803,8 +1803,10 @@ SILValue swift::makeValueAvailable(SILValue value, SILBasicBlock *inBlock) {
bool swift::tryEliminateOnlyOwnershipUsedForwardingInst(
SingleValueInstruction *forwardingInst, InstModCallbacks &callbacks) {
if (!ForwardingInstruction::isa(forwardingInst) ||
isa<AllArgOwnershipForwardingSingleValueInst>(forwardingInst))
if (!ForwardingInstruction::isa(forwardingInst))
return false;
if (ForwardingInstruction::canForwardAllOperands(forwardingInst))
return false;
SmallVector<Operand *, 32> worklist(getNonDebugUses(forwardingInst));