diff options
| author | 2017-02-25 16:53:02 +0000 | |
|---|---|---|
| committer | 2017-02-25 16:53:02 +0000 | |
| commit | 4bee5e8dcd4521bd95b4198faa3853851702518d (patch) | |
| tree | 9ecedb1181707c51ffbd53548fe2212a3baccac2 | |
| parent | Fix the types used on aarch64 to match what we have in <sys/types.h>. (diff) | |
| download | wireguard-openbsd-4bee5e8dcd4521bd95b4198faa3853851702518d.tar.xz wireguard-openbsd-4bee5e8dcd4521bd95b4198faa3853851702518d.zip | |
Disable loop idiom recognition for _libc_memset and _libc_memcpy. These are
the internal names we use in libc for memset and memcpy and having the
compiler optimize them as calls to memset and memcpy will lead to infinite
recursion.
This is a temporary solution while guenther@ tries to figure out a better
way to force calls from inside libc via identifiers that are of hidden
visibility.
ok jsg@, patrick@
| -rw-r--r-- | gnu/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gnu/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/gnu/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index 5fec51c095d..991a8f9115e 100644 --- a/gnu/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/gnu/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -231,6 +231,8 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L) { StringRef Name = L->getHeader()->getParent()->getName(); if (Name == "memset" || Name == "memcpy") return false; + if (Name == "_libc_memset" || Name == "_libc_memcpy") + return false; // Determine if code size heuristics need to be applied. ApplyCodeSizeHeuristics = |
