[PATCH] D57625: [TargetLibraryInfo] Update run time support for Windows

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 10:11:20 PST 2019


evandro marked 3 inline comments as done.
evandro added inline comments.


================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:182
+    // Win32 does not support float math functions, in general.
+    if (!isPartialC99) {
       TLI.setUnavailable(LibFunc_acosf);
----------------
evandro wrote:
> mstorsjo wrote:
> > This changes behaviour for old MSVCRT versions as well - you're hiding many orthogonal issues under the same `isPartialC99` variable.
> > 
> > The functions here, e.g. `acosf`, does exist even in very old MSVCRT versions, but only on x86_64, arm and arm64, not on i386. `acosf` does not exist as a function in `libcmt.lib` or `msvcrt.lib` (or `libucrt.lib` or `ucrt.lib` for modern versions) for i386, not even for the latest versions of MSVC.
> > 
> > After this change, `acosf` and the others in this if statement would become unavailable for x86_64 for MSVC versions prior to 19, even though we earlier allowed and used that function for any MSVCRT version, on x86_64.
> > 
> > So there's two orthogonal issues at play here:
> > 
> > 1) Some functions (`f`-suffixed) don't exist on some architectures, but exist on others. Regardless of MSVCRT version.
> > 
> > 2) Some functions (`acosh`, `rint`, etc) appeared in some MSVCRT version (MSVC 19 is a good and safe threshold for this even though they might have appeared earlier) but were missing before that, regardless of architecture. And once these appeared, they appeared with all three forms (`rint`, `rintf` and `rintl`) at once, on all architectures (even if the `l` suffixed version is pointless on MSVC as long double == double).
> OK, I think that I understand what you mean.  Stand by.
Also, do you mean that that all C99 versions appeared in VC19?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57625/new/

https://reviews.llvm.org/D57625





More information about the llvm-commits mailing list