[PATCH] D86724: [BuildLibCalls] Add argmemonly to more lib calls.

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 10:18:34 PDT 2020


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/BuildLibCalls.cpp:322
     Changed |= setDoesNotThrow(F);
+    Changed |= setDoesNotFreeMemory(F);
     Changed |= setDoesNotCapture(F, 0);
----------------
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?


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