[PATCH] D96021: [LoopVectorize] NFC: Move UserVF feasibility checks to separate function.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 13:52:53 PST 2021


sdesmalen added a comment.

Hi @fhahn, following your feedback, I've refactored the patches in this series a bit to move out some common calculations from `getFeasibleUserVF` and `computeFeasibleMaxVF`. I've also tried to implement your idea to start off with a very wide vector, that gets subsequently limited by: loop dependence-distance, vector-register-width, iteration count, etc. You'll see in D96023 <https://reviews.llvm.org/D96023> that the code is now relatively straight-forward in how it limits the MaxVF, and how it works for both fixed- and scalable vectors. You'll also notice that `computeFeasibleMaxVF` no longer takes an explicit `bool ComputeScalableMaxVF` flag.

Hopefully this is more along the lines that you had in mind!

Patches D96021 <https://reviews.llvm.org/D96021> and D96022 <https://reviews.llvm.org/D96022> just move some code around, which I think makes the code quite a bit more readable. Specifically for this patch, if you have no objections I'd be quite eager to land this patch, since it just moves some existing functionality into its own function which I think is an immediate improvement. Discussion on how things will end up for scalable vectors can then be done on the subsequent patches.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96021/new/

https://reviews.llvm.org/D96021



More information about the llvm-commits mailing list