swift
09a5a448 - Optimizer: add a utility to replaces phis with the unique incoming values if all incoming values are the same

Commit
1 year ago
Optimizer: add a utility to replaces phis with the unique incoming values if all incoming values are the same This is needed after running the SSAUpdater for an existing OSSA value, because the updater can insert unnecessary phis in the middle of the original liverange which breaks up the original liverange into smaller ones: ``` %1 = def_of_owned_value %2 = begin_borrow %1 ... br bb2(%1) bb2(%3 : @owned $T): // inserted by SSAUpdater ... end_borrow %2 // use after end-of-lifetime! destroy_value %3 ``` It's not needed to run this utility if SSAUpdater is used to create a _new_ OSSA liverange.
Author
Parents
Loading