[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
Wed Oct 2 11:30:00 PDT 2019


xbolva00 added a comment.

Can the kernel just implement it this easy way?  memccpy is not very known but I believe there are places in the kernel where memccpy could be used efficiently by kernel devs.

https://code.woboq.org/userspace/glibc/string/memccpy.c.html


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

https://reviews.llvm.org/D67986





More information about the llvm-commits mailing list