[llvm] [InferAttrs] Refine attributes for a few libc routines (PR #131117)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 13 03:36:01 PDT 2025


================
@@ -816,7 +816,7 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
     Changed |= setDoesNotThrow(F);
     Changed |= setDoesNotCapture(F, 0);
     Changed |= setDoesNotCapture(F, 3);
-    // FIXME: readonly #1?
+    Changed |= setOnlyReadsMemory(F, 0);
----------------
nikic wrote:

Should the corresponding fread arg be write-only?

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


More information about the llvm-commits mailing list