[PATCH] D72178: [DA] Delinearization of fixed-size multi-dimensional arrays
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 13:10:53 PST 2020
bmahjour marked an inline comment as done.
bmahjour added inline comments.
================
Comment at: llvm/lib/Analysis/DependenceAnalysis.cpp:3360-3361
- // Below code mimics the code in Delinearization.cpp
- const SCEV *SrcAccessFn =
- SE->getSCEVAtScope(SrcPtr, SrcLoop);
- const SCEV *DstAccessFn =
- SE->getSCEVAtScope(DstPtr, DstLoop);
+ if (!DisableDelinearizationChecks)
+ return false;
----------------
Meinersbur wrote:
> Please add a comment why this is bailing out here.
>
> We could also check for GEP's [[ https://llvm.org/docs/LangRef.html#getelementptr-instruction | inrange ]] modifier and require it unless `DisableDelinearizationChecks` is set.
> We could also check for GEP's inrange modifier and require it unless DisableDelinearizationChecks is set.
We could, however I'd suggest we consider that as a separate patch. There are some peculiarities with GEP's inrange that I need to understand better. In particular, it's not clear to me why the syntax allows `inrange` to appear before multiple indexes, but the `getInRangeIndex()` API only allows a single index to be retrieved.
If I understand this conversation https://reviews.llvm.org/D22793?id=65626#inline-194586 correctly, then we can only try to delinearize GEPs when
`SrcGEP->getInRangeIndex().getValue() == SrcGEP->getNumIndices()`. Is that true?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72178/new/
https://reviews.llvm.org/D72178
More information about the llvm-commits
mailing list