bzero libcall is disabled except on Darwin version 10+.
This patch enables the use of bzero (especially on X86 when zeroing out memory) when user can provide a fast implementation.
Details
Details
- Reviewers
courbet
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 40282 Build 40384: arc lint + arc unit
Event Timeline
Comment Actions
> cat test.cc
#include <cstring>
void foo(char* ptr, unsigned size) {
memset(ptr, 0, size);
}> /tmp/llvm-project_dbg_compiled-with-clang/bin/clang++ test.cc --S -O3 -o-
# %bb.0: # %entry
movl %esi, %edx
xorl %esi, %esi
jmp memset # TAILCALL> /tmp/llvm-project_dbg_compiled-with-clang/bin/clang++ test.cc -mllvm --override-libcall-bzero=bzero -S -O3 -o-
# %bb.0: # %entry
pushq %rax
movl %esi, %esi
callq bzero
popq %rax
retqComment Actions
As discussed with @courbet I'm dropping this review because we don't want to add more backend flags.