[PATCH] D67986: [InstCombine] snprintf (d, size, "%s", s) -> memccpy (d, s, '\0', size - 1), d[size - 1] = 0
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 03:21:10 PST 2019
xbolva00 abandoned this revision.
xbolva00 added a comment.
In D67986#1702901 <https://reviews.llvm.org/D67986#1702901>, @MaskRay wrote:
> This transformation seems to increase code size significantly. Is the snprintf "%s" pattern common enough? I suspect most projects have already used memccpy, stpncpy, strscpy, or strlcpy. For the few that don't, the performance probably does not matter.
I think this is right, since correct expansion via memccpy is quite big even for -O3.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67986/new/
https://reviews.llvm.org/D67986
More information about the llvm-commits
mailing list