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).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
4090 | (Post-commit comment, independent of this patch:) Worth improving this case as well? |
nit: no need to use llvm:: (e.g. it is not used for other things in the namespace, like PHINode or User.