[PATCH] D96025: [LoopVectorize] Return both fixed and scalable Max VF from computeMaxVF.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 04:29:39 PST 2021


sdesmalen added a comment.

In D96025#2565165 <https://reviews.llvm.org/D96025#2565165>, @rogfer01 wrote:

> Hi Sander, one question `OptionalVFCandidates::addMaxVF` combines using the maximum but AFAICT it is not used in a loop. Maybe you plan to "update" the corresponding VF values (scalable and/or fixed) in other places (not shown in the current patch, yet)?

Hi Roger, thanks for having a look! This patch is part of a series that allows the vectorizer to reason about a suitable VF (fixed or scalable):

- D96021 <https://reviews.llvm.org/D96021>, D96022 <https://reviews.llvm.org/D96022>, D96023 <https://reviews.llvm.org/D96023>, D96025 <https://reviews.llvm.org/D96025> are mostly NFC changes that restructure the code to make it easier to reason about both fixed/scalable VFs (and adds the OptionalVFCandidates class).
- D96546 <https://reviews.llvm.org/D96546> then adds a function `genAllPowerOfTwoFactorsUptoMaxFactors`, which uses two loops to generate all power-of-two VFs upto the max-VFs. It is still more or less NFC, because it doesn't yet consider the scalable VF for vectorization.
- D96547 <https://reviews.llvm.org/D96547> let's the cost-model reason about those scalable VFs, so that it can pick a scalable VF as the most profitable VF.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96025



More information about the llvm-commits mailing list