The original loop is O(MxN) since is_contained iterates over
all incoming values. This change makes it so only the phis
which use the value as an incoming value are iterated over so
it is now O(M).
This patch is analogous to D146999.
Differential D147944
[LV][NFC] Improve complexity of fixing users of reductions michaelmaitland on Apr 10 2023, 7:53 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions There are quite a few tests filing in the perecommit CI. Could you rebase & double check if the current version works as expected? Comment Actions I am going to abandon this revision. This case is not the same as in fixFixedOrderReccurence since we do not have the LiveOut->phis() function here to check whether the LoopExistInst is contained in incoming values in an O(1) fashion. |
auto *Phi