mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
TempLValueOpt eliminates copies from a temporary to destination and supports hoisting projections of the destination. An enum is fully initialized with the pair init_enum_data_addr and inject_enum_addr. Calling destroy_addr only before inject_enum_addr can cause a runtime crash. This optimization can eliminate copy_addr and hoist init_enum_data_addr such that enum is not fully initialized before it's use. Disable this case for now. Fixes rdar://145941433 To correctly do this optimization we have to find the corresponding inject_enum_addr and hoist it as well or ensure the source is not used until fully initialized by inject_enum_addr.
12 KiB
12 KiB