Commit Graph

5 Commits

Author SHA1 Message Date
Erik Eckstein 14b9e8f1f6 OSSACanonicalizeOwned: don't do analysis for dead-end blocks
This is expensive and not needed anymore since we have complete lifetimes.
2026-04-30 17:53:40 +02:00
Erik Eckstein 172bf39901 Optimizer: let OSSA canonicalization always respect deinit barriers
When computing the region to search for deinit barriers, include _all_ destroys of a canonical liverange - including destroys of all copies.
Before this fix, only destroys of the original def were considered which resulted in moving destroys across deinit barriers.

Fixes a miscompile
rdar://168337959
2026-01-23 10:08:41 +01:00
Andrew Trick 8cdef92334 Add a FIXME to CopyPropagation to highlight an incomplete fix. 2025-12-05 11:16:08 -08:00
Erik Eckstein 633d42b1b4 Optimizer: correctly handle bit-wise escaping values in OSSA canonicalization
We cannot compute the liverange of a value if it bit-wise escapes.
This fixes a mis-compile in copy-propagation which hoists a destroy_value over a use of the escaped value when lexical liveranges are disabled.
The test case is a simplified SIL sequence from the stdlib core where this problem shows up, because we build the stdlib core with disabled lexical liveranges.
2025-11-27 22:07:11 +01:00
Nate Chandler 8f1d6616af [NFC] OSSACanonicalizeOwned: Renamed. 2025-08-18 09:45:21 -07:00