Files
swift-mirror/SwiftCompilerSources/Sources/Optimizer/Utilities/AddressUtils.swift
Andrew Trick 9f7bf2a507 Improve LocalVariableUtils.gatherKnownLifetimeUses; dead ends
Add a fake use for dead-end blocks. This allows gatherKnownLifetimeUses to be
used for local liveness by considering an "unreachable" instruction to generate
liveness. This is important when liveness is used as a boundary within which
access scopes may be extended. Otherwise, we are unable to extend access scopes
into dead-end blocks.

Fixes rdar://154406790 (Lifetime-dependent variable 'X' escapes its
scope but only if actor/class is final)

(cherry picked from commit 239255b8bc)
2025-07-03 21:34:25 -07:00

25 KiB