[llvm] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 17 13:05:44 PST 2025
================
@@ -555,12 +591,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F,
Changed |= setDoesNotThrow(F);
Changed |= setDoesNotCapture(F, 0);
Changed |= setOnlyReadsMemory(F, 0);
+ Changed |=
+ setOnlyAccessesInaccessibleOrArgOrErrnoMem(F, MR::ModRef, MR::Ref);
break;
case LibFunc_mktime:
Changed |= setRetAndArgsNoUndef(F);
Changed |= setDoesNotThrow(F);
Changed |= setWillReturn(F);
Changed |= setDoesNotCapture(F, 0);
+ Changed |= setOnlyAccessesInaccessibleOrArgOrErrnoMem(F);
----------------
nikic wrote:
mktime also interacts with the tzname, timezone and daylight globals.
https://github.com/llvm/llvm-project/pull/124742
More information about the llvm-commits
mailing list