[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:05 PDT 2020


fhahn updated this revision to Diff 288438.
fhahn added a comment.

Thanks, updated to add argmemonly also for strchr,bcmp. Do not add it for strcasecmp/strncasecmp. Remove unnecessary setDoesNotFreeMemory.

In D86724#2242628 <https://reviews.llvm.org/D86724#2242628>, @jdoerfert wrote:

> FWIW, I have a non-clean patch for this too that has some more things we could add: https://github.com/jdoerfert/llvm-project/commit/c405073b6f353b3bccb10f222185763c4c7e3457
> I would recommend we sort the order in each case, arguments first, in order of their number, than return than function, or something similar. that makes it easier to compare and read IMHO.
> We should maybe wait for D85932 <https://reviews.llvm.org/D85932> and start using the script for this file, it can handle what we need it too nicely (I think/hope).

That's great, there's definitely lots of additional stuff missing. I already adjusted the lines, I don't think there a need to await for a script update. We can just re-generate the lines once the script update is in.

> I'm fine with doing them in multiple steps, especially D85932 <https://reviews.llvm.org/D85932> should make this even simpler.

I think it is beneficial to do this in a few steps, so we can more easily bisect problems.

In D86724#2242875 <https://reviews.llvm.org/D86724#2242875>, @efriedma wrote:

> https://www.gnu.org/software/libc/manual/html_node/String_002fArray-Comparison.html#index-strcasecmp says "How uppercase and lowercase characters are related is determined by the currently selected locale."  That seems pretty clear.

Thanks, this indeed seems clear. The first page I found was not as explicit https://linux.die.net/man/3/strcasecmp. I moved them to strcoll.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86724/new/

https://reviews.llvm.org/D86724

Files:
  llvm/lib/Transforms/Utils/BuildLibCalls.cpp
  llvm/test/Transforms/InferFunctionAttrs/annotate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86724.288438.patch
Type: text/x-patch
Size: 8904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/69fc60dd/attachment.bin>


More information about the llvm-commits mailing list