[all-commits] [llvm/llvm-project] 86b67a: [LAA] Prune dependencies with distance large than ...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Aug 25 14:24:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86b67a310dedf4d0c6a5bc012d8bee7dbac1d2ad
      https://github.com/llvm/llvm-project/commit/86b67a310dedf4d0c6a5bc012d8bee7dbac1d2ad
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Transforms/LoopVectorize/RISCV/safe-dep-distance.ll

  Log Message:
  -----------
  [LAA] Prune dependencies with distance large than access implied by trip count

When we have a dependency with a dependence distance which can only be hit on an iteration beyond the actual trip count of the loop, we can ignore that dependency when analyzing said loop. We already had this code, but had restricted it solely to unknown dependence distances. This change applies it to all dependence distances.

Without this code, we relied on the vectorizer reducing VF such that our infeasible dependence was respected. This usually worked out to about the same result, but not always. For fixed length vectorization, this could mean a smaller VF than optimal being chosen or additional runtime checks. For scalable vectorization - where the bounds on access implied by VF are broader - we could often not find a feasible VF at all.

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




More information about the All-commits mailing list