[PATCH] D119078: [LAA, LV] Add initial support for pointer-diff memory checks.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 09:28:36 PDT 2022
dmgreen added a comment.
I have a set of MVE routines (that we were using as benchmarks) where this certainly helps a really decent amount.
================
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
----------------
-> used to prove
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:249
+
+ auto &PtrI = Pointers[CGI.Members[0]];
+ auto &PtrJ = Pointers[CGJ.Members[0]];
----------------
I find its best not to overuse auto when the type isn't obvious. This is a PointerInfo?
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:285
+ SinkAR->getLoop()->getHeader()->getModule()->getDataLayout();
+ unsigned AllocSize = DL.getTypeAllocSize(
+ PtrI.PointerValue->getType()->getPointerElementType());
----------------
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.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:286
+ unsigned AllocSize = DL.getTypeAllocSize(
+ PtrI.PointerValue->getType()->getPointerElementType());
+ auto *IntTy = IntegerType::get(Src->PointerValue->getContext(),
----------------
Is this one of the methods removed with opaque pointers?
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