[llvm] [Attributor]: allow more than one offset for a pass through user in AAPointerInfo (PR #94416)
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 10:58:21 PDT 2024
================
@@ -1607,11 +1607,20 @@ 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 &UsrOI = OffsetInfoMap[Usr];
+ auto &PtrOI = OffsetInfoMap[CurPtr];
+ UsrOI = PtrOI;
+ Follow = true;
+ return true;
+ }
+
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);
----------------
jdoerfert wrote:
We need a test.
https://github.com/llvm/llvm-project/pull/94416
More information about the llvm-commits
mailing list