[libc-commits] [PATCH] D114637: [libc] Optimized version of memmove

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Nov 26 06:09:38 PST 2021


gchatelet created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added a project: libc-project.
gchatelet requested review of this revision.

This implementation relies on storing data in registers for sizes up to 128B.
Then depending on whether `dst` is less (resp. greater) than `src` we move data forward (resp. backward) by chunks of 32B.
We first make sure one of the pointers is aligned to increase performance on large move sizes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114637

Files:
  libc/src/__support/CPP/ArrayRef.h
  libc/src/string/CMakeLists.txt
  libc/src/string/memmove.cpp
  libc/src/string/memory_utils/elements.h
  libc/test/src/string/memmove_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114637.390038.patch
Type: text/x-patch
Size: 21285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20211126/877bccb0/attachment-0001.bin>


More information about the libc-commits mailing list