[all-commits] [llvm/llvm-project] b1c424: [LoopInterchange] Improve profitability check for ...

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Thu Apr 3 01:00:46 PDT 2025


  Branch: refs/heads/users/kasuga-fj/loop-interchange-improve-profitable-vectorization
  Home:   https://github.com/llvm/llvm-project
  Commit: b1c4248c4a242698feedb6d69d61d07dbcca407c
      https://github.com/llvm/llvm-project/commit/b1c4248c4a242698feedb6d69d61d07dbcca407c
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2025-04-03 (Thu, 03 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/test/Transforms/LoopInterchange/profitability-vectorization-heuristic.ll

  Log Message:
  -----------
  [LoopInterchange] Improve profitability check for vectorization

The vectorization profitability has a process to check whether a given
loop can be vectorized or not. Since the process is conservative, a loop
that can be vectorized may be deemed not to be possible. This can
trigger unnecessary exchanges.
This patch improves the profitability decision by mitigating such
misjudgments. Before this patch, we considered a loop to be vectorizable
only when there are no loop carried dependencies with the IV of the
loop. However, a loop carried dependency doesn't prevent vectorization
if the distance is positive. This patch makes the vectorization check
more accurate by allowing a loop with the positive dependency. Note that
it is difficult to make a complete decision whether a loop can be
vectorized or not. To achieve this, we must check the vector width and
the distance of dependency.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list