[llvm] [InferAttrs] Refine attributes for a few libc routines (PR #131117)
    Antonio Frighetto via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Mar 13 04:09:30 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);
----------------
antoniofrighetto wrote:
Right, thanks! Think it should be as well for fgets first arg.
https://github.com/llvm/llvm-project/pull/131117
    
    
More information about the llvm-commits
mailing list