[PATCH] D150706: [LAA] Update MaxSafeDepDistBytes when non-unit stride

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 13:48:39 PDT 2023


michaelmaitland added inline comments.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:2003
   // both A and B could be vectorized by 2 iterations.
   MaxSafeDepDistBytes =
+      std::min(static_cast<uint64_t>(Distance / Stride), MaxSafeDepDistBytes);
----------------
ABataev wrote:
> Looks like variable name does not match its semantics anymore
I'm not sure I agree. I think that the value was simply incorrectly computed previously. Can you please elaborate on what you mean? Do you have any suggestions on a better name?

The getter for this variable is documented as `The maximum number of bytes of a vector register we can vectorize the accesses safely with`. The variable itself is documented as `We can access this many bytes in parallel safely`.  I think that both of these statements hold under the changes made in this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150706/new/

https://reviews.llvm.org/D150706



More information about the llvm-commits mailing list