[llvm] Extend MemoryEffects to Support Target-Specific Memory Locations (PR #148650)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 01:25:39 PDT 2025


================
@@ -142,6 +142,9 @@ static void addLocAccess(MemoryEffects &ME, const MemoryLocation &Loc,
     ME |= MemoryEffects::argMemOnly(MR);
   ME |= MemoryEffects(IRMemLocation::ErrnoMem, MR);
   ME |= MemoryEffects(IRMemLocation::Other, MR);
+  // Should also set the other Target Memory Locations as MR.
+  // To compares with MemoryEffects::unknown() in addMemoryAttrs
+  ME |= MemoryEffects::setTargetMemLocationModRef(MR);
----------------
CarolineConcatto wrote:

I am not sure I understand what is the problem here.
I've changed to be the same as IRMemLocation::Other and IRMemLocation::ErrnoMem.


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


More information about the llvm-commits mailing list