[llvm] [LAA] Avoid duplicate runtime-check group members (PR #226829)
Dávid Bolvanský via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 06:49:55 PDT 2026
================
@@ -736,21 +736,21 @@ void RuntimePointerChecking::groupChecks(
unsigned TotalComparisons = 0;
- DenseMap<Value *, SmallVector<unsigned>> PositionMap;
- for (unsigned Index = 0; Index < Pointers.size(); ++Index)
- PositionMap[Pointers[Index].PointerValue].push_back(Index);
+ DenseMap<Value *, SmallVector<unsigned>> PointerToIndices;
+ for (unsigned I = 0; I < Pointers.size(); ++I)
+ PointerToIndices[Pointers[I].PointerValue].push_back(I);
// We need to keep track of what pointers we've already seen so we
// don't process them twice.
- SmallSet<unsigned, 2> Seen;
+ SmallSet<unsigned, 2> SeenIndices;
// Go through all equivalence classes, get the "pointer check groups"
// and add them to the overall solution. We use the order in which accesses
// appear in 'Pointers' to enforce determinism.
for (unsigned I = 0; I < Pointers.size(); ++I) {
// We've seen this pointer before, and therefore already processed
// its equivalence class.
- if (Seen.contains(I))
+ if (SeenIndices.contains(I))
----------------
davidbolvansky wrote:
Done in 62921fcb9d63. I restored the original , , and names so the diff only shows the functional change.
https://github.com/llvm/llvm-project/pull/226829
More information about the llvm-commits
mailing list