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

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 16:31:45 PDT 2024


Author: Vidush Singhal
Date: 2024-06-17T16:31:39-07:00
New Revision: bea329ecb0bd756d2e169169fb4333e9cd4d2dae

URL: https://github.com/llvm/llvm-project/commit/bea329ecb0bd756d2e169169fb4333e9cd4d2dae
DIFF: https://github.com/llvm/llvm-project/commit/bea329ecb0bd756d2e169169fb4333e9cd4d2dae.diff

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

Co-authored-by: Vidush Singhal <singhal2 at ruby964.llnl.gov>

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index a9bf32e0a8498..57579bbca00ee 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -1608,11 +1608,15 @@ 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.
+
+    assert(OffsetInfoMap.contains(CurPtr) &&
+           "CurPtr does not exist in the map!");
+
     auto &UsrOI = OffsetInfoMap[Usr];
     auto &PtrOI = OffsetInfoMap[CurPtr];
     assert(!PtrOI.isUnassigned() &&
            "Cannot pass through if the input Ptr was not visited!");
-    UsrOI = PtrOI;
+    UsrOI.merge(PtrOI);
     Follow = true;
     return true;
   };


        


More information about the llvm-commits mailing list