Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-15 Thread Nick Desaulniers
On Mon, Sep 14, 2020 at 9:28 PM Joe Perches wrote: > > On Mon, 2020-09-14 at 21:22 -0700, Nathan Chancellor wrote: > > It would be nice to get this into mainline sooner rather than later so > > that it can start filtering into the stable trees. ToT LLVM builds have > > been broken for a month now.

Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-15 Thread Nick Desaulniers
On Mon, Sep 14, 2020 at 9:22 PM Nathan Chancellor wrote: > > It would be nice to get this into mainline sooner rather than later so > that it can start filtering into the stable trees. ToT LLVM builds have > been broken for a month now. Hi Andrew, I appreciate your help getting this submitted to

Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-14 Thread Joe Perches
On Mon, 2020-09-14 at 21:22 -0700, Nathan Chancellor wrote: > It would be nice to get this into mainline sooner rather than later so > that it can start filtering into the stable trees. ToT LLVM builds have > been broken for a month now. People that build stable trees with new compilers unsupporte

Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-14 Thread Nathan Chancellor
On Mon, Sep 14, 2020 at 09:16:43AM -0700, Nick Desaulniers wrote: > LLVM implemented a recent "libcall optimization" that lowers calls to > `sprintf(dest, "%s", str)` where the return value is used to > `stpcpy(dest, str) - dest`. This generally avoids the machinery involved > in parsing format str

[PATCH v5] lib/string.c: implement stpcpy

2020-09-14 Thread Nick Desaulniers
LLVM implemented a recent "libcall optimization" that lowers calls to `sprintf(dest, "%s", str)` where the return value is used to `stpcpy(dest, str) - dest`. This generally avoids the machinery involved in parsing format strings. `stpcpy` is just like `strcpy` except it returns the pointer to the