[all-commits] [llvm/llvm-project] f835fe: [LV] Rename blockNeedsPredication to blockNeedsPre...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Mon Nov 15 00:30:46 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f835fe8ef75646b1867f30a0b3af624d32be4a63
      https://github.com/llvm/llvm-project/commit/f835fe8ef75646b1867f30a0b3af624d32be4a63
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  [LV] Rename blockNeedsPredication to blockNeedsPredicationForAnyReason.

The interface is a convenience function to ask if a block requires
predication when widening, but it's important that there are two
separate concepts to consider:
(A) The block was predicated in the original loop.
(B) The block was unpredicated in the original loop, but requires
    predication because of tail folding.

In the case of (B) we know that at least one lane of the vector will
be executed, which means we can implementing a load from a uniform address
with a scalar load + splat (D112552). In the case of predication because
of (A), we cannot do this, because the scalar load itself requires
predication.

The name 'blockNeedsPredication' does not make the distinction between
(A) and (B), hence the reason to rename it.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D113392




More information about the All-commits mailing list