We started building iOS sanitizers when switching to
`LLVM_ENABLE_RUNTIMES` to build compiler-rt, and turns out they
currently provide only the arm64 slice.
Addresses rdar://151782340
Apply the MoveOnlyAddressChecker change from
https://github.com/swiftlang/swift/pull/73358 to the
MoveOnly[Value]Checker.
After 7713eef817, before running value
checking, all lifetimes in the function are completed. That doesn't
quite work because lifetime completion expects not to encounter
reborrows or their adjacent phis.
rdar://151325025
This fixes a timeout failure in CI. It looks like that some CI machines are slower than expected.
I could not reproduce this locally. There doesn't seem to be a compile time regression.
Enable walking into `TypeOffsetSizePair`s from an existential into an
archetype. And set the access kind on `open_existential_addr`
instructions which are the sources of rewritten `copy_addr`s to mutable.
rdar://141279635
The test run time jumped from ~200s to ~600s on Linux.
Unfortunately I could not reproduce this locally.
But what I saw is that ARCSequenceOpts is taking 75% of the compile time: rdar://144863155
Let's increase the timeout a bit until we can get rid of ARCSequenceOpts.
rdar://144810758
As the utility runs, new gens may become local: as access scopes are
determined to contain deinit barriers, their `end_access` instructions
become kills; if such an `end_access` occurs in the same block above an
initially-non-local gen, that gen is now local.
Previously, it was asserted that initially-non-local gens would not
encounter when visiting the block backwards from that gen. Iteration
would also _stop_ at the discovered kill, if any. As described above,
the assertion was incorrect.
Stopping at the discovered kill was also incorrect. It's necessary to
continue walking the block after finding such a new kill because the
book-keeping the utility does for which access scopes contain barriers.
Concretely, there are two cases:
(1) It may contain another `end_access` and above it a deinit barrier
which must result in that second scope becoming a deinit barrier.
(2) Some of its predecessors may be in the region, all the access scopes
which are open at the begin of this block must be unioned into the set
of scopes open at each predecessors' end, and more such access scopes
may be discovered above the just-visited `end_access`.
Here, both the assertion failure and the early bailout are fixed by
walking from the indicated initially-non-local gen backwards over the
entire block, regardless of whether a kill was encountered. If a kill
is encountered, it is asserted that the kill is an `end_access` to
account for the case described above.
rdar://139840307
This test forces the usage of macosx-x86_64 and will fail if the x86_64
slice of the stdlib has not been built. Mark it as only running on
macosx-x86_64 to avoid the test failure in that case.
Such destroys mark the lifetime end of their operands along their
availability boundary. They are currently inserted in this test case
by the ClosureLifetimeFixup pass, but in the fullness of time they will
be present for every value which is not explicitly destroyed (that's
what complete OSSA lifetimes is mostly about).
Currently, such destroys are diagnosed by DiagnoseUnreachable. Fix the
diagnostic pass not to diagnose these valid instructions.
rdar://137960229
It turns out that some CI jobs need 5-6 minutes for this test. To give some slack, use a timeout of 10 minutes.
This is a follow-up of https://github.com/swiftlang/swift/pull/76146
No update is needed for the values they produce. This pass should
really be refactored not to crash on instructions that aren't explicitly
listed or at least not to compile if not every instruction is listed.
rdar://133779160
Unknown uses of raw pointers should not result in bailing out when an
address is lexical--the destroy of the address will already not be
hoisted over any instructions which may access pointers. If the address
is not lexical however (such as any address when lexical lifetimes are
disabled), that rationale does not apply, so unknown uses of raw
pointers must cause hoisting to bail.
rdar://133969821
The checker already verifies that no non-destroy consuming users occur
after any `move_value`s corresponding to `consume` operators applied to
a value. There may, however, be _destroy_ users after it.
Previously, the checker did not shorten the lifetime from those destroys
up to `move_value`s that appear after those `move_value`s. The result
was that the value's lifetime didn't end at the `consume`.
Here, the checker is fixed to rewrite the lifetimes so that they both
end at `consume`s and also maintain their lexical lifetimes on paths
away from the `consume`s. This is done by using
`OwnedValueCanonicalization`/`CanonicalizeOSSALifetime`.
Specifically, it passes the `move_value`s that correspond to
source-level `consume`s as the `lexicalLifetimeEnds` to the
canonicalizer. Typically, the canonicalizer retracts the lexical
lifetime of the value from its destroys. When these `move_value`s are
specified, however, instead it retracts them from the lifetime boundary
obtained by maximizing the lifetime within its original lifetime while
maintaining the property that the lifetime ends at those `move_value`s.
rdar://113142446
An empty struct without a deinit gets a single bit which is used to
track the struct's liveness. Previously, an empty struct with a deinit
also only got a single bit. Consequently, when discarding the struct
(i.e. dropping the deinit), there was no bit left to represent the
struct. This resulted in a failure to track liveness for the value.
rdar://126863003