[PATCH] D89645: [InferAttrs] Add nocapture/writeonly to string/mem libcalls
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 15 15:14:03 PDT 2021
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/BuildLibCalls.cpp:233
Changed |= setDoesNotCapture(F, 1);
+ Changed |= setOnlyWritesMemory(F, 0);
Changed |= setOnlyReadsMemory(F, 1);
----------------
fhahn wrote:
> I believer this is causing the first argument of `str(n)cat` to be incorrectly marked as `write only`. `str(n)cat` appends at the end of the first string, but to do so it first needs to read the argument to find the end of the null-terminated string. I put up a fix D100601
Right, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89645/new/
https://reviews.llvm.org/D89645
More information about the llvm-commits
mailing list