OSDN Git Service

[libc] Allow customization of memcpy via flags.
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 15 Jan 2021 09:26:45 +0000 (09:26 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 15 Jan 2021 09:26:45 +0000 (09:26 +0000)
commita10300a2b27c426556f9266364337d5d546a3c14
treefbec7306b6bda6b1c0f6d9964de2048946debe21
parentbfb8f45ef3f46102d290f11039faa82456c920ae
[libc] Allow customization of memcpy via flags.

 - Adds LLVM_LIBC_IS_DEFINED macro to libc/src/__support/common.h
 - Adds a few knobs to memcpy to help with experimentations:
   - LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB replaces the implementation with a single call to rep;movsb
   - LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE customizes where the usage of rep;movsb

Differential Revision: https://reviews.llvm.org/D94692
libc/src/__support/common.h
libc/src/string/x86/memcpy.cpp