[llvm] [Attributor]: allow more than one offset for a pass through user in AAPointerInfo (PR #94416)

Vidush Singhal via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 10:27:50 PDT 2024


================
@@ -1607,11 +1607,19 @@ ChangeStatus AAPointerInfoFloating::updateImpl(Attributor &A) {
     //
     // The RHS is a reference that may be invalidated by an insertion caused by
     // the LHS. So we ensure that the side-effect of the LHS happens first.
+
+    if (!OffsetInfoMap.contains(Usr)) {
+      auto &PtrOI = OffsetInfoMap[CurPtr];
+      OffsetInfoMap.insert(std::make_pair(Usr, PtrOI));
----------------
vidsinghal wrote:

Doesn't std::make_pair store by [value](https://stackoverflow.com/questions/63522732/are-the-values-stored-in-stdpair-by-reference-or-by-value) ?

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


More information about the llvm-commits mailing list