search for: libm

Displaying 20 results from an estimated 1314 matches for "libm".

Did you mean: ibm
2013 Nov 10
2
[LLVMdev] [RFC] How to fix sqrt vs llvm.sqrt optimization asymmetry
Hello everyone, The particular motivation for this e-mail is my desire for feedback on how to fix PR17758; but there is a core design issue here, so I'd like a wide audience. The underlying issue is that, because the semantics of llvm.sqrt are purposefully defined to be different from libm sqrt (unlike all of the other llvm.<libm function> intrinsics) (*), and because autovectorization relies on the vector forms of these intrinsics when vectorizing function calls to libm math functions, we cannot vectorize a libm sqrt() call into a vector llvm.sqrt call. However, in fast-math m...
2013 Nov 11
0
[LLVMdev] [RFC] How to fix sqrt vs llvm.sqrt optimization asymmetry
...ause there is a SSE packed sqrt instruction (SQRTPS) but not e.g. a packed sin instruction AFAIK. As mentioned in a recent mail to this list, I would like llvm.sqrt to be defined as NaN for argument x < 0. I believe this would bring it more into line with the other intrinsics, and with the libm result, which is NaN for x < 0: http://pubs.opengroup.org/onlinepubs/007904975/functions/sqrt.html Cheers, Nick On 10/11/2013 3:36 p.m., Hal Finkel wrote: > Hello everyone, > > The particular motivation for this e-mail is my desire for feedback on how to fix PR17758; but there...
2017 Oct 03
2
Trouble when suppressing a portion of fast-math-transformations
>>> I'd like to emphasise in the latter one: "This option also relaxes the precision of >>> commonly used math functions." >> >> Isn't this the "libm" flag that is proposed in this thread? > > I don't know. I didn't see any definition of it. > > In my case I'm talking about allowing the use of lower precision but very fast machine > instructions instead of a slow sequence of inline instructions. But I guess instru...
2020 Nov 09
2
Targeting old glibc
...ir/__/__/AudioModulesFrame/AM_WavLoader.cpp.o: > reference to exp > Projects/Podolski/CMakeFiles/Podolski.dir/__/__/libs/tinyexpr/tinyexpr.c.o: > reference to exp > Projects/Podolski/CMakeFiles/Podolski.dir/__/__/AudioModulesFrame/AM_PitchTrack.cpp.o: > reference to exp > /usr/lib/libm.so.6: shared definition of exp at GLIBC_2.2.5 > /usr/lib/libm.so.6: shared definition of exp > /usr/lib/libm.so.6: shared definition of exp at GLIBC_2.29 > /usr/lib/libmvec.so.1: reference to exp at GLIBC_2.29 > > So the dependency is being pulled by libmvec. > > Which is stran...
2020 Nov 09
2
Targeting old glibc
No. A shared object is needed if it is linked in (1)--no-as-needed mode or (2) after --gc-sections, a symbol referenced by a live input section is defined by the shared object. You'll need to check whether a symbol is defined by libmvec.so.1 On Mon, Nov 9, 2020 at 9:57 AM Alexandre Bique <bique.alexandre at gmail.com> wrote: > > On Mon, Nov 9, 2020 at 6:52 PM Fāng-ruì Sòng <maskray at google.com> wrote: > > Recent libm.a and libm.so are actually linker scripts > > > > % cat /usr/lib/x86_64-l...
2017 Oct 04
2
Trouble when suppressing a portion of fast-math-transformations
> It might be clearer, instead of using 'libm', to use something like 'trans' (for transcendental functions). That does seem clearer. ‘trans’ is definitely good with me. -Warren From: Hal Finkel [mailto:hfinkel at anl.gov] Sent: Tuesday, October 3, 2017 5:13 PM To: Ristow, Warren; Bruce Hoult Cc: llvm-dev at lists.llvm.org Subj...
2013 Nov 23
2
[LLVMdev] [RFC] Identifying access to errno
Hello, On some systems (Linux/glibc, for example), some libm math functions (like cos(double)) might set errno. It is important that we model this, in general, to prevent miscompilation (we would not, for example, want to reorder a call to cos in between a call to open and a call to perror). However, almost no code in the wild checks errno after calls to lib...
2013 Nov 12
3
[LLVMdev] [RFC] How to fix sqrt vs llvm.sqrt optimization asymmetry
...on how to treat sqrt predate our current way of handling errno? -Hal > > As mentioned in a recent mail to this list, I would like llvm.sqrt to > be > defined as NaN for argument x < 0. I believe this would bring it > more > into line with the other intrinsics, and with the libm result, which > is > NaN for x < 0: > http://pubs.opengroup.org/onlinepubs/007904975/functions/sqrt.html > > Cheers, > Nick > > On 10/11/2013 3:36 p.m., Hal Finkel wrote: > > Hello everyone, > > > > The particular motivation for this e-mail is my...
2013 Nov 23
2
[LLVMdev] [RFC] Identifying access to errno
...t cs.uiuc.edu> > Sent: Saturday, November 23, 2013 10:53:09 AM > Subject: Re: [LLVMdev] [RFC] Identifying access to errno > > > > > On 23 November 2013 14:14, Hal Finkel < hfinkel at anl.gov > wrote: > > > On some systems (Linux/glibc, for example), some libm math functions > (like cos(double)) might set errno. It is important that we model > this, in general, to prevent miscompilation (we would not, for > example, want to reorder a call to cos in between a call to open and > a call to perror). However, almost no code in the wild checks errn...
2013 Nov 23
0
[LLVMdev] [RFC] Identifying access to errno
On 23 November 2013 14:14, Hal Finkel <hfinkel at anl.gov> wrote: > On some systems (Linux/glibc, for example), some libm math functions (like > cos(double)) might set errno. It is important that we model this, in > general, to prevent miscompilation (we would not, for example, want to > reorder a call to cos in between a call to open and a call to perror). > However, almost no code in the wild checks errn...
2013 Nov 12
3
[LLVMdev] [RFC] How to fix sqrt vs llvm.sqrt optimization asymmetry
...to treat sqrt predate our > > current way of handling errno? > > The intention of llvm.sqrt is that it is the same as sqrt(), but > doesn't affect errno. If it helps, I think it would be completely > reasonable to change this in langref.html: > > "Unlike sqrt in libm, however, llvm.sqrt has undefined behavior for > ..." > > to "... produces an undefined value", with a link back to > ##undefined-values. I'm not sure that helps, because it will prevents sqrt + -fno-math-errno (a readnone sqrt) -> llvm.sqrt -- and thus still pre...
2016 Jun 07
3
llvm intrinsics/libc/libm question
I'm trying to figure out exactly how the intrinsics/libc/libm work in llvm. For example, this code return user defined function: float acos(float x, float y) { return x+y; } float a; void foo(float b, float c) { a = acos(b, c); } But this code returns llvm.intrinsic: float acos(float, float); float a; void foo(float b, float c) { a = acos(b, c)...
2013 Nov 23
3
[LLVMdev] [RFC] Identifying access to errno
...t; > Subject: Re: [LLVMdev] [RFC] Identifying access to errno >> > >> > >> > >> > >> > On 23 November 2013 14:14, Hal Finkel < hfinkel at anl.gov > wrote: >> > >> > >> > On some systems (Linux/glibc, for example), some libm math functions >> > (like cos(double)) might set errno. It is important that we model >> > this, in general, to prevent miscompilation (we would not, for >> > example, want to reorder a call to cos in between a call to open and >> > a call to perror). However, al...
2001 Oct 17
3
libraries Problem
...r/X11R6/lib/libSM.so.6) libX11.so.6 (/usr/X11R6/lib/libX11.so.6) libXext.so.6 (/usr/X11R6/lib/libXext.so.6) libXi.so.6 (/usr/X11R6/lib/libXi.so.6) libXpm.so.4 (/usr/X11R6/lib/libXpm.so.4) libXt.so.6 (/usr/X11R6/lib/libXt.so.6) libc.so.6 (/lib/libc.so.6) libdl.so.2 (/lib/libdl.so.2) libm.so.6 (/lib/libm.so.6) libncurses.so.5 (/usr/lib/libncurses.so.5) libutil.so.1 (/lib/libutil.so.1) libfreetype.so.6 (/usr/lib/libfreetype.so.6) libjpeg.so.62 (/usr/lib/libjpeg.so.62.0.0) libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.2) libc.so.6(GLIBC_2.1.3) libc.so.6(GLI...
2013 Nov 23
0
[LLVMdev] [RFC] Identifying access to errno
...November 23, 2013 10:53:09 AM > > Subject: Re: [LLVMdev] [RFC] Identifying access to errno > > > > > > > > > > On 23 November 2013 14:14, Hal Finkel < hfinkel at anl.gov > wrote: > > > > > > On some systems (Linux/glibc, for example), some libm math functions > > (like cos(double)) might set errno. It is important that we model > > this, in general, to prevent miscompilation (we would not, for > > example, want to reorder a call to cos in between a call to open and > > a call to perror). However, almost no code in...
2002 Jul 17
1
R/C interface
...trying to use the R/C interface on a Unix system that unfortunately does not have the gnu C compiler and am having trouble accessing the math functions from math.h. To compile a C program with math functions on this system, the following command is used (and the order is important: the /usr/lib/libm.a statement must come at the end of the command): "cc program.c /usr/lib/libm.a" I am having trouble getting R to compile the C programs with this extra command (/usr/lib/libm.a). I have tried the CFLAGS option, and have looked at the scripts for the COMPILE and SHLIB commands but ha...
2018 Mar 23
2
LLVM gold plugin do not add llvm instrinsics symbols to the linker symbol table
...wrong, just want to share my observations with the community. Brief summary If I create a static library with a custom version of 'exp()' math function and link it as follows: $ clang -O0 -ffast-math -flto a.o -L. -Wl,-Bstatic -lexp -Wl,-Bdynamic -lm exp gets resolved from libm instead of my static library (libexp.a) even though the static library appears first on the link command line. Reproducer 1) As a reproducer I built a tiny static library (with the name libexp.a) with exp function defined: $ cat exp.c double exp (double x) { return x; } $ clang -...
2020 Nov 10
2
Targeting old glibc
Thank you very much for your help Fāng-ruì Sòng. I've tried various things like linking directly to libm-2.32 but it didn't work, it seems that libm-2.32 still pulls libmvec. I have the following linker flags: CLANG_LDFLAGS="-fuse-ld=lld -static-libstdc++ -static-libgcc -fvisibility=hidden -fdata-sections -ffunction-sections" CLANG_LDFLAGS="$CLANG_LDFLAGS -Wl,--gc-sections -Wl,-O1...
2020 Oct 28
2
Targeting old glibc
On Wed, Oct 28, 2020 at 6:07 PM Fangrui Song <maskray at google.com> wrote: > > On 2020-10-28, Alexandre Bique via llvm-dev wrote: > >Hi, > > > >I wonder what is the right way to target an old glibc? > > > >I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). > > > >So far I've been able to target older glibc by having a
2013 Nov 24
0
[LLVMdev] [RFC] Identifying access to errno
...er 23, 2013 10:53:09 AM > > Subject: Re: [LLVMdev] [RFC] Identifying access to errno > > > > > > > > > > On 23 November 2013 14:14, Hal Finkel < hfinkel at anl.gov > wrote: > > > > > > On some systems (Linux/glibc, for example), some libm math > > functions > > (like cos(double)) might set errno. It is important that we model > > this, in general, to prevent miscompilation (we would not, for > > example, want to reorder a call to cos in between a call to open > > and > > a call to perror). However...