[SILOptimizer] Let visitTransitiveEndBorrows take SILValues.

Previously, visitTransitiveEndBorrows took BorrowedValues.  However,
there is at least one kind of borrow--namely,
unchecked_ownership_conversion insts--that is not currently permitted by
the BorrowedValue API.  The long term fix is to make BorrowedValue
handle such instructions.  For now, change visitTransitiveEndBorrows to
take SILValues so that unchecked_ownership_conversion can be passed to
the API.

rdar://87985420
This commit is contained in:
Nate Chandler
2022-01-25 15:44:58 -08:00
parent 275a080f08
commit e3fbadf7b7
5 changed files with 39 additions and 5 deletions

View File

@@ -623,7 +623,7 @@ void AliasAnalysis::computeImmutableScope(SingleValueInstruction *beginScopeInst
addEndScopeInst(endAccess);
}
} else {
visitTransitiveEndBorrows(BorrowedValue(beginScopeInst), addEndScopeInst);
visitTransitiveEndBorrows(beginScopeInst, addEndScopeInst);
}
// Second step: walk up the control flow until the beginScopeInst and add