mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The effect of passing -enable-copy-propagation is both to enable the CopyPropagation pass to shorten object lifetimes and also to enable lexical lifetimes to ensure that object lifetimes aren't shortened while a variable is still in scope and used. Add a new flag, -enable-lexical-borrow-scopes=true to override -enable-copy-propagation's effect (setting it to ::ExperimentalLate) on SILOptions::LexicalLifetimes that sets it to ::Early even in the face of -enable-copy-propagation. The old flag -disable-lexical-lifetimes is renamed to -enable-lexical-borrow-scopes=false but continues to set that option to ::Off even when -enable-copy-propagation is passed.
91 KiB
91 KiB