[Mlir-commits] [clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

Nikita Popov llvmlistbot at llvm.org
Thu Feb 6 08:17:20 PST 2025


================
@@ -126,8 +126,21 @@ static void addLocAccess(MemoryEffects &ME, const MemoryLocation &Loc,
     return;
   if (isa<Argument>(UO)) {
     ME |= MemoryEffects::argMemOnly(MR);
+    if (Loc.Size <= LocationSize::precise(sizeof(int)))
+      ME |= MemoryEffects::errnoMemOnly(MR);
----------------
nikic wrote:

This doesn't look right. Even if the argument might alias errno, it's still argmem from the perspective of this function. The caller has to deal with what the argument actually points to.

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


More information about the Mlir-commits mailing list