[libc-commits] [libc] [libc] Remove unnecessary call in memfunction dispatchers (PR #75800)

Dmitry Vyukov via libc-commits libc-commits at lists.llvm.org
Tue Dec 19 02:21:17 PST 2023


================
@@ -32,7 +32,8 @@
 
 namespace LIBC_NAMESPACE {
 
-LIBC_INLINE int inline_bcmp(const void *p1, const void *p2, size_t count) {
+__attribute__((flatten)) LIBC_INLINE int
----------------
dvyukov wrote:

> > Another good question is how to test this. These things regress due to compiler bugs, or seemingly unrelated refactorings. Quality bugs are more frequent than crashing bugs because they are silent and go unnoticed.
> 
> @nickdesaulniers for visibility. Good question indeed. This could be part of the integration tests. We'd have to disassemble the function and make sure they do not consist in a single jump to another function.

FWIW we have such a test for ThreadSanitizer hot paths:
https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/tsan/check_analyze.sh
And I will send you a link to one internal test that does it.

https://github.com/llvm/llvm-project/pull/75800


More information about the libc-commits mailing list