diff options
author | serge-sans-paille <sguelton@redhat.com> | 2020-02-21 15:51:19 +0100 |
---|---|---|
committer | serge-sans-paille <sguelton@redhat.com> | 2020-02-28 10:07:37 +0100 |
commit | 6d15c4deab51498b70825fb6cefbbfe8f3d9bdcf (patch) | |
tree | ab2c6c23549368204f62896deb35cbd810a14cbe /llvm/lib/Analysis/TargetLibraryInfo.cpp | |
parent | 01f9abbb50b11dd26b9ccb7cb565cc955d2b9c74 (diff) | |
download | llvm-6d15c4deab51498b70825fb6cefbbfe8f3d9bdcf.zip llvm-6d15c4deab51498b70825fb6cefbbfe8f3d9bdcf.tar.gz llvm-6d15c4deab51498b70825fb6cefbbfe8f3d9bdcf.tar.bz2 |
No longer generate calls to *_finite
According to Joseph Myers, a libm maintainer
> They were only ever an ABI (selected by use of -ffinite-math-only or
> options implying it, which resulted in the headers using "asm" to redirect
> calls to some libm functions), not an API. The change means that ABI has
> turned into compat symbols (only available for existing binaries, not for
> anything newly linked, not included in static libm at all, not included in
> shared libm for future glibc ports such as RV32), so, yes, in any case
> where tools generate direct calls to those functions (rather than just
> following the "asm" annotations on function declarations in the headers),
> they need to stop doing so.
As a consequence, we should no longer assume these symbols are available on the
target system.
Still keep the TargetLibraryInfo for constant folding.
Differential Revision: https://reviews.llvm.org/D74712
Diffstat (limited to 'llvm/lib/Analysis/TargetLibraryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetLibraryInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index 2c4809b..3928fbd 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -472,6 +472,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, TLI.setUnavailable(LibFunc_tmpfile64); // Relaxed math functions are included in math-finite.h on Linux (GLIBC). + // Note that math-finite.h is no longer supported by top-of-tree GLIBC, + // so we keep these functions around just so that they're recognized by + // the ConstantFolder. TLI.setUnavailable(LibFunc_acos_finite); TLI.setUnavailable(LibFunc_acosf_finite); TLI.setUnavailable(LibFunc_acosl_finite); |