[llvm] 521b216 - [TargetLibraryInfo] memcpy and memset have optimized codegen.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Mon May 18 00:37:26 PDT 2020
Author: Clement Courbet
Date: 2020-05-18T08:49:23+02:00
New Revision: 521b216094340e7934c1dd7905982cc778237cb8
URL: https://github.com/llvm/llvm-project/commit/521b216094340e7934c1dd7905982cc778237cb8
DIFF: https://github.com/llvm/llvm-project/commit/521b216094340e7934c1dd7905982cc778237cb8.diff
LOG: [TargetLibraryInfo] memcpy and memset have optimized codegen.
Summary:
Add memcpy and memset to the list of function with optimized codegen.
hasOptimizedCodeGen() was returning false for them.
This was not an issue when working with c++ as clang typically emits an
intrinsic rather than a libfunc call, but when working with IR,
this would cause some issues with sanitizers which would not correctly
mark the function as nobuiltin in `maybeMarkSanitizerLibraryCallNoBuiltin()`.
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78991
Added:
Modified:
llvm/include/llvm/Analysis/TargetLibraryInfo.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
index 427048003c46..0b57e95cddeb 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
@@ -350,6 +350,7 @@ class TargetLibraryInfo {
case LibFunc_trunc: case LibFunc_truncf: case LibFunc_truncl:
case LibFunc_log2: case LibFunc_log2f: case LibFunc_log2l:
case LibFunc_exp2: case LibFunc_exp2f: case LibFunc_exp2l:
+ case LibFunc_memcpy: case LibFunc_memset: case LibFunc_memmove:
case LibFunc_memcmp: case LibFunc_bcmp: case LibFunc_strcmp:
case LibFunc_strcpy: case LibFunc_stpcpy: case LibFunc_strlen:
case LibFunc_strnlen: case LibFunc_memchr: case LibFunc_mempcpy:
More information about the llvm-commits
mailing list