[all-commits] [llvm/llvm-project] 87656b: [LAA] Refine stride checks for SCEVs during depend...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Aug 10 03:05:18 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 87656b311523827c1960a66009cc6cf81c8abb70
      https://github.com/llvm/llvm-project/commit/87656b311523827c1960a66009cc6cf81c8abb70
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-08-10 (Sat, 10 Aug 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/LoopAccessAnalysis.h
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Analysis/LoopAccessAnalysis/load-store-index-loaded-in-loop.ll
    M llvm/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
    M llvm/test/Analysis/LoopAccessAnalysis/print-order.ll
    M llvm/test/Analysis/LoopAccessAnalysis/select-dependence.ll
    M llvm/test/Analysis/LoopAccessAnalysis/symbolic-stride.ll

  Log Message:
  -----------
  [LAA] Refine stride checks for SCEVs during dependence analysis. (#99577)

Update getDependenceDistanceStrideAndSize to reason about different
combinations of strides directly and explicitly.

Update getPtrStride to return 0 for invariant pointers.

Then proceed by checking the strides.

If either source or sink are not strided by a constant (i.e. not a
non-wrapping AddRec) or invariant, the accesses may overlap
with earlier or later iterations and we cannot generate runtime
checks to disambiguate them.

Otherwise they are either loop invariant or strided. In that case, we
can generate a runtime check to disambiguate them.

If both are strided by constants, we proceed as previously.

This is an alternative to
https://github.com/llvm/llvm-project/pull/99239 and also replaces
additional checks if the underlying object is loop-invariant.

Fixes https://github.com/llvm/llvm-project/issues/87189.

PR: https://github.com/llvm/llvm-project/pull/99577



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