[LV][NFC] Improve complexity of fixing users of recurrences
authorMichael Maitland <michaeltmaitland@gmail.com>
Mon, 27 Mar 2023 20:14:38 +0000 (13:14 -0700)
committerMichael Maitland <michaeltmaitland@gmail.com>
Thu, 6 Apr 2023 23:15:51 +0000 (16:15 -0700)
commite86ed9bf2a61409553ba51bf218bd97d2b9e9132
tree314f6e913a5154c53348ffac7c75327b9b763ae8
parentbc95f27337c7ed77c28e713c855272848f01802a
[LV][NFC] Improve complexity of fixing users of recurrences

The original loop has 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).

Differential Revision: https://reviews.llvm.org/D146999
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp