[PATCH] D88819: [LV] Support for Remainder loop vectorization
Vinay Madhusudan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 08:12:12 PDT 2020
mivnay added a comment.
In D88819#2311678 <https://reviews.llvm.org/D88819#2311678>, @fhahn wrote:
> Did you consider supporting this naturally by just having LV re-visit the newly created remainder loops, i.e. remember the created remainder loops and add them to the top-level worklist https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp#L8587 ? We would need to make sure we do not visit them repeatedly, but overall we should be able to achieve the same goal, but without adding extra complexity to the vectorizer.
Blindly calling the vectorizer for the loop again is not optimal. The current change does that but at lower abstraction level. The majority of the changes are about setting the right overall CFG structure. Example: It is unnecessary to execute runtime checks twice, etc. "struct EpilogVectorLoopHelper" is just the carrier of information from the original vector loop generation to the epilog vector loop generation. Also, InnerLoopVectorizer doesn't expose the vector loop CFG structure to it's users. Fixing the CFG structure at the higher abstraction level exposes this class completely.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88819/new/
https://reviews.llvm.org/D88819
More information about the llvm-commits
mailing list