================
@@ -119,24 +135,41 @@ template <typename LocationEnum> class MemoryEffectsBase {
       setModRef(Loc, MR);
   }
 
+  /// Create MemoryEffectsBase that can access any location with the given
+  /// ModRefInfo, excluding floating-point locations.
+  /// The boolean argument value is not used, it only allows to distinguish
+  /// between constructors.
+  MemoryEffectsBase(ModRefInfo MR, bool) {
+    for (Location Loc : mem_locations())
+      setModRef(Loc, MR);
+  }
+
   /// Create MemoryEffectsBase that can read and write any memory.
   static MemoryEffectsBase unknown() {
     return MemoryEffectsBase(ModRefInfo::ModRef);
   }
 
+  /// Create MemoryEffectsBase that can read and write any memory except
+  /// floating-point registers.
+  static MemoryEffectsBase unknown_mem() {
+    return MemoryEffectsBase(ModRefInfo::ModRef, false);
----------------
krzysz00 wrote:

```suggestion
    return MemoryEffectsBase(ModRefInfo::ModRef, /*AccessesFpInfo=*/false);
```

https://github.com/llvm/llvm-project/pull/221754
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to