[PATCH] D147539: [LV] Enable stride versioning to support Fortran IR
Jun Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 15 03:11:52 PDT 2023
junaire added inline comments.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:173
+ auto getStrideSize = [=]() -> uint64_t {
+ if (auto Gep = dyn_cast<GetElementPtrInst>(Ptr)) {
+ const DataLayout &DL = SE->getDataLayout();
----------------
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:176
+ uint64_t GepSize = DL.getTypeSizeInBits(Gep->getResultElementType());
+ Value::user_iterator UI = Ptr->user_begin();
+ Type *AccessTy = getLoadStoreType(*UI++);
----------------
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:178
+ Type *AccessTy = getLoadStoreType(*UI++);
+ for (Value::user_iterator E = Ptr->user_end(); UI != E; UI++)
+ if (getLoadStoreType(*UI) != AccessTy)
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147539/new/
https://reviews.llvm.org/D147539
More information about the llvm-commits
mailing list