[PATCH] D119376: [LoopAccessAnalysis] Simplify D119047
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 12:16:27 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG04d398db4694: [LoopAccessAnalysis] Simplify D119047 (authored by aeubanks).
Changed prior to commit:
https://reviews.llvm.org/D119376?vs=423187&id=446598#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119376/new/
https://reviews.llvm.org/D119376
Files:
llvm/lib/Analysis/LoopAccessAnalysis.cpp
Index: llvm/lib/Analysis/LoopAccessAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1011,7 +1011,7 @@
unsigned RunningDepId = 1;
DenseMap<Value *, unsigned> DepSetId;
- SmallVector<MemAccessInfo, 4> Retries;
+ SmallVector<std::pair<MemAccessInfo, Type *>, 4> Retries;
// First, count how many write and read accesses are in the alias set. Also
// collect MemAccessInfos for later.
@@ -1049,7 +1049,7 @@
ShouldCheckWrap, false)) {
LLVM_DEBUG(dbgs() << "LAA: Can't find bounds for ptr:"
<< *Access.getPointer() << '\n');
- Retries.push_back(Access);
+ Retries.push_back({Access, AccessTy});
CanDoAliasSetRT = false;
}
}
@@ -1073,15 +1073,15 @@
// We know that we need these checks, so we can now be more aggressive
// and add further checks if required (overflow checks).
CanDoAliasSetRT = true;
- for (auto Access : Retries) {
- for (const auto &AccessTy : Accesses[Access]) {
- if (!createCheckForAccess(RtCheck, Access, AccessTy, StridesMap,
- DepSetId, TheLoop, RunningDepId, ASId,
- ShouldCheckWrap, /*Assume=*/true)) {
- CanDoAliasSetRT = false;
- UncomputablePtr = Access.getPointer();
- break;
- }
+ for (auto Retry : Retries) {
+ MemAccessInfo Access = Retry.first;
+ Type *AccessTy = Retry.second;
+ if (!createCheckForAccess(RtCheck, Access, AccessTy, StridesMap,
+ DepSetId, TheLoop, RunningDepId, ASId,
+ ShouldCheckWrap, /*Assume=*/true)) {
+ CanDoAliasSetRT = false;
+ UncomputablePtr = Access.getPointer();
+ break;
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119376.446598.patch
Type: text/x-patch
Size: 2006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220721/79675b85/attachment-0001.bin>
More information about the llvm-commits
mailing list