[PATCH] D86724: [BuildLibCalls] Add argmemonly to more lib calls.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 13:02:34 PDT 2020
fhahn marked 5 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/BuildLibCalls.cpp:322
Changed |= setDoesNotThrow(F);
+ Changed |= setDoesNotFreeMemory(F);
Changed |= setDoesNotCapture(F, 0);
----------------
jdoerfert wrote:
> xbolva00 wrote:
> > xbolva00 wrote:
> > > Should be nofree opt out rather than opt in?
> > >
> > > @jeoerfert
> > Ok, we have there:
> >
> > if(!isLibFreeFunction(&F, TheLibFunc) && !isReallocLikeFn(&F, &TLI))
> > Changed |= setDoesNotFreeMemory(F);
> >
> >
> > So why we need to set nofree for memcmp?
> I think it was set before already. So no need to add it here if that was the case.
Oh right, that's great, I removed it.
================
Comment at: llvm/lib/Transforms/Utils/BuildLibCalls.cpp:327
case LibFunc_memchr:
case LibFunc_memrchr:
+ Changed |= setOnlyAccessesArgMemory(F);
----------------
xbolva00 wrote:
> We miss attrs for strnlen
probably best to add in a separate patch, as it is completely missing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86724/new/
https://reviews.llvm.org/D86724
More information about the llvm-commits
mailing list