[PATCH] D119078: [LAA, LV] Add initial support for pointer-diff memory checks.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 10:00:38 PDT 2022
fhahn added inline comments.
================
Comment at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:448
+ // Returns an optional list of (pointer-difference expressions, access size)
+ // pairs that can be used prove that there are no vectorization-preventing
+ // dependencies at runtime. There are is a vectorization-preventing dependency
----------------
dmgreen wrote:
> -> used to prove
Updated, thanks!
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:285
+ SinkAR->getLoop()->getHeader()->getModule()->getDataLayout();
+ unsigned AllocSize = DL.getTypeAllocSize(
+ PtrI.PointerValue->getType()->getPointerElementType());
----------------
dmgreen wrote:
> Does this assume that both the AllocSize's are the same?
>
> If it picks the larger size - I think it would be OK so long as the steps below matched. And the smaller size might need some very strange code to cause problems. It might be worth checking for though.
> Does this assume that both the AllocSize's are the same?
Originally yes, but I updated the code to use the max. Added tests to cover those cases in 368d35a89440.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:286
+ unsigned AllocSize = DL.getTypeAllocSize(
+ PtrI.PointerValue->getType()->getPointerElementType());
+ auto *IntTy = IntegerType::get(Src->PointerValue->getContext(),
----------------
dmgreen wrote:
> Is this one of the methods removed with opaque pointers?
Good point, I updated the code to get the store/loaded type from the actual instructions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119078/new/
https://reviews.llvm.org/D119078
More information about the llvm-commits
mailing list