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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 07:36:09 PDT 2025


================
@@ -49,6 +49,25 @@ def IntrArgMemOnly : IntrinsicProperty;
 // accessible by the module being compiled. This is a weaker form of IntrNoMem.
 def IntrInaccessibleMemOnly : IntrinsicProperty;
 
+
+
+class IntrinsicMemoryLocation;
+// Tablegen representation of IRMemLocation.
+// TODO: Populate with all IRMemLocation enum values and update
+// getValueAsIRMemLocation accordingly.
+def InaccessibleMem : IntrinsicMemoryLocation;
+def TargetMem0 : IntrinsicMemoryLocation;
+def TargetMem1 : IntrinsicMemoryLocation;
+// The list of IRMemoryLocations that are read from.
+class IntrRead<list<IntrinsicMemoryLocation> idx> : IntrinsicProperty {
+   list<IntrinsicMemoryLocation>  MemLoc=idx;
+}
+//  The list of IRMemoryLocations that are write from.
----------------
paulwalker-arm wrote:

```suggestion
//  The list of IRMemoryLocations that are write to.
```

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


More information about the llvm-commits mailing list