[llvm] [Attributor] Change allocation size and load/store offsets using AAPointerInfo for Alloca instructions (PR #72029)

Vidush Singhal via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 22 20:47:18 PDT 2024


================
@@ -12811,6 +13056,21 @@ struct AAAllocationInfoImpl : public AAAllocationInfo {
     }
     return false;
   }
+
+  // Maps an old byte range to its new Offset range in the new allocation.
+  // Returns (bool) weather the old byte range's offsets changed or not.
+  bool setNewOffsets(const AA::RangeTy &OldRange, int64_t OldOffset,
+                     int64_t NewComputedOffset, int64_t Size) {
----------------
vidsinghal wrote:

The Map is a` DenseMap<AA::RangeTy, AA:RangeTy>` 
it stores the old range to the new range in the allocation. 
The RangeTy struct, should be unique if there are bins with the same offset but different sizes. So the entry in the map will be unique. 
Is that an issue?



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


More information about the llvm-commits mailing list