[SIL-opaque] Removed [Unconditional]CheckedCastValue

This commit is contained in:
Andrew Trick
2022-03-05 17:45:02 -08:00
parent 1c07c50cf8
commit 2fd4de411e
45 changed files with 24 additions and 788 deletions

View File

@@ -1205,6 +1205,11 @@ bool swift::emitSuccessfulIndirectUnconditionalCast(
/// Can the given cast be performed by the scalar checked-cast
/// instructions?
///
/// TODO: in OSSA-with-opaque-values SIL, all casts could be modeled using
/// scalar casts by setting 'OwnershipForwardingMixin::directlyForwards =
/// false'. This would simplify SIL analysis. Temporaries would be emitted
/// during address lowering.
bool swift::canUseScalarCheckedCastInstructions(SILModule &M,
CanType sourceFormalType,
CanType targetFormalType) {