mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
784da0a090
Keypath simplification can create new basic blocks when projecting optional chain components (OptionalChainProjector splits the block and creates new conditional branches). However, the Swift-side tryOptimizeKeypath was not notifying the pass manager about CFG or instruction changes, leaving analyses like the dominator tree stale. Fix this by calling notifyBranchesChanged() and notifyInstructionsChanged() when tryOptimizeKeypath succeeds.