[llvm] [Attributor][FIX] Track returned pointer offsets (PR #110534)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 06:31:02 PDT 2024


================
@@ -1495,16 +1477,16 @@ struct AAPointerInfoFloating : public AAPointerInfoImpl {
       Size = AccessSize.getFixedValue();
 
     // Make a strictly ascending list of offsets as required by addAccess()
-    llvm::sort(Offsets);
-    auto *Last = llvm::unique(Offsets);
-    Offsets.erase(Last, Offsets.end());
+    SmallVector<int64_t> OffsetsSorted(Offsets.begin(), Offsets.end());
+    llvm::sort(OffsetsSorted);
----------------
shiltian wrote:

I missed the change of `using VecTy = SmallSet<int64_t, 4>;`.

https://github.com/llvm/llvm-project/pull/110534


More information about the llvm-commits mailing list