[all-commits] [llvm/llvm-project] 81d318: [LAA] Keep pointer checks on partial analysis (#13...

John Brawn via All-commits all-commits at lists.llvm.org
Wed Jun 4 08:47:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81d3189891c2dcb5925308629571fb95badaae33
      https://github.com/llvm/llvm-project/commit/81d3189891c2dcb5925308629571fb95badaae33
  Author: John Brawn <john.brawn at arm.com>
  Date:   2025-06-04 (Wed, 04 Jun 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/LoopAccessAnalysis.h
    M llvm/include/llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/Scalar/LoopAccessAnalysisPrinter.cpp
    M llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
    A llvm/test/Analysis/LoopAccessAnalysis/allow-partial.ll
    M llvm/test/Analysis/LoopAccessAnalysis/forked-pointers.ll
    M llvm/test/Analysis/LoopAccessAnalysis/non-constant-strides-backward.ll
    M llvm/test/Analysis/LoopAccessAnalysis/non-constant-strides-forward.ll
    M llvm/test/Analysis/LoopAccessAnalysis/pointer-phis.ll
    M llvm/test/Analysis/LoopAccessAnalysis/retry-runtime-checks-after-dependence-analysis-forked-pointers.ll
    M llvm/test/Analysis/LoopAccessAnalysis/underlying-object-loop-varying-phi.ll
    M llvm/test/Transforms/LoopVersioningLICM/load-from-unknown-address.ll

  Log Message:
  -----------
  [LAA] Keep pointer checks on partial analysis (#139719)

Currently if there's any memory access that AccessAnalysis couldn't
analyze then all of the runtime pointer check results are discarded.
This patch makes this able to be controlled with the AllowPartial
option, which makes it so we generate the runtime check information
for those pointers that we could analyze, as transformations may still
be able to make use of the partial information.

Of the transformations that use LoopAccessAnalysis, only
LoopVersioningLICM changes behaviour as a result of this change. This is
because the others either:
* Check canVectorizeMemory, which will return false when we have partial
pointer information as analyzeLoop() will return false.
* Examine the dependencies returned by getDepChecker(), which will be
empty as we exit analyzeLoop if we have partial pointer information
before calling areDepsSafe(), which is what fills in the dependency
information.



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