SIL: replace the is_escaping_closure instruction with destroy_not_escaped_closure

The problem with `is_escaping_closure` was that it didn't consume its operand and therefore reference count checks were unreliable.
For example, copy-propagation could break it.
As this instruction was always used together with an immediately following `destroy_value` of the closure, it makes sense to combine both into a `destroy_not_escaped_closure`.
It
1. checks the reference count and returns true if it is 1
2. consumes and destroys the operand
This commit is contained in:
Erik Eckstein
2025-01-24 18:46:50 +01:00
parent 42fef1fb68
commit 3ec5d7de24
39 changed files with 95 additions and 113 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 = 915; // ignored_use
const uint16_t SWIFTMODULE_VERSION_MINOR = 916; // destroy_not_escaped_closure
/// A standard hash seed used for all string hashes in a serialized module.
///