[sil] Add a new instruction called explicit_copy_addr.

This is exactly like copy_addr except that it is not viewed from the verifiers
perspective as an "invalid" copy of a move only value. It is intended to be used
in two contexts:

1. When the move checker emits a diagnostic since it could not eliminate a copy,
we still need to produce valid SIL without copy_addr on move only types since we
will hit canonical SIL eventually even if we don't actually codegen the SIL. The
pass can just convert said copy_addr to explicit_copy_addr and everyone is
happy.

2. To implement the explicit copy function for address only types.
This commit is contained in:
Michael Gottesman
2022-08-11 10:11:12 -07:00
parent 82ae1d1a2d
commit 5baf2af88a
19 changed files with 249 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 699; // @_alwaysEmitConformanceMetadata
const uint16_t SWIFTMODULE_VERSION_MINOR = 700; // explicit_copy_addr
/// A standard hash seed used for all string hashes in a serialized module.
///