search for: cosf

Displaying 16 results from an estimated 16 matches for "cosf".

Did you mean: conf
2018 Jun 28
3
Since MCJIT I can't get libm functions to work
...ons from libm are not resolved/found. I am using the lambda resolver from the KaleidoscopeJIT class which first searches the present modules and, if that is unsuccessful, continues the search in the whole process space. The generated modules would declare external functions like declare float @cosf(float) and would call it like:   %17 = call float @cosf(float %16) The datalayout is set to target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" The code snippet that adds the module is pretty much from the JIT tutorial:       auto Resolver = llvm::orc::createLambdaResolver...
2018 Jun 28
2
Since MCJIT I can't get libm functions to work
...found. I am using the lambda resolver from the KaleidoscopeJIT class which first searches the present modules and, if that is unsuccessful, continues the search in the whole process space. >> >> The generated modules would declare external functions like >> >> declare float @cosf(float) >> >> and would call it like: >> >> %17 = call float @cosf(float %16) >> >> The datalayout is set to >> >> target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" >> >> The code snippet that adds the module is prett...
2019 Mar 22
2
MCJIT, can't use with math functions
Hi, for my application (uses Builder and MCJIT) I am making the transition LLVM 6.0 -> 8.0. It runs fine for self-contained functions, but whenever a jit-ed function contains calls to the math library (e.g. @cosf) it seems to have problems getting the address after successfully finding the symbol: Failure value returned from cantFail wrapped call UNREACHABLE executed at ~/toolchain/install/llvm-8.0-x86-debug/include/llvm/Support/Error.h:732! if (auto Sym = CompileLayer.findSymbol(MangledNameStream.str()...
2013 Jan 22
2
[LLVMdev] sincos optimization
Hi, I'm looking at http://llvm.org/bugs/show_bug.cgi?id=13204 which involves converting calls to sin and cos to sincos (when available) Initially I thought about transforming calls to sinf/cosf to sincosf. However, I don't think this is a legal transformation given that a declaration for a function called sinf is not necessarily the standard library function. Therefore it makes sense to transform intrinsic calls to sin and cos. One problem with this is that clang does not generate si...
2019 Mar 26
2
ORC JIT fails with standard math librrary
...was tested on an x86 Linux Ubuntu system. Does anyone see what's going on or is it time to file a bug report? Regards, Frank -------------- next part -------------- source_filename = "module" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" declare float @cosf(float) define float @func_ir(float %arg0) { entrypoint: %0 = call float @cosf(float %arg0) ret float %0 } -------------- next part -------------- source_filename = "module" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" define float @func_ir(float %arg0) { en...
2013 Sep 24
5
Problem compiling opus-tools-0.1.7
...sr/local/lib/libopus.a(quant_bands.o): In function `amp2Log2': /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:547: undefined reference to `log' /usr/local/lib/libopus.a(vq.o): In function `exp_rotation': /home/peppermint/build/opus-1.1-beta/celt/vq.c:81: undefined reference to `cosf' /home/peppermint/build/opus-1.1-beta/celt/vq.c:82: undefined reference to `cosf' /usr/local/lib/libopus.a(vq.o): In function `alg_quant': /home/peppermint/build/opus-1.1-beta/celt/vq.c:227: undefined reference to `floorf' /usr/local/lib/libopus.a(vq.o): In function `normalise_resid...
2013 Sep 24
0
Problem compiling opus-tools-0.1.7
...bopus.a(quant_bands.o): In function `amp2Log2': > /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:547: undefined reference to `log' > /usr/local/lib/libopus.a(vq.o): In function `exp_rotation': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:81: undefined reference to `cosf' > /home/peppermint/build/opus-1.1-beta/celt/vq.c:82: undefined reference to `cosf' > /usr/local/lib/libopus.a(vq.o): In function `alg_quant': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:227: undefined reference to `floorf' > /usr/local/lib/libopus.a(vq.o): In funct...
2012 Dec 31
3
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
...i64 %223 %225 = load float* %224, align 4 %226 = call float @sinf(float %225) nounwind readnone %227 = call float @asinf(float %226) nounwind readnone %228 = add i64 %216, %222 %229 = getelementptr [0 x float]* %173, i64 0, i64 %228 %230 = load float* %229, align 4 %231 = call float @cosf(float %230) nounwind readnone %232 = call float @acosf(float %231) nounwind readnone %233 = fadd float %227, %232 %234 = getelementptr float* %208, i64 %223 store float %233, float* %234, align 4 %235 = icmp eq i32 %221, %.pre118.i %236 = add i32 %221, 1 br i1 %235, label %"166.i...
2010 Nov 17
0
[LLVMdev] constand folding of functions
...u add round and trunc to llvm::canConstantFoldCallTo (and the code that actually does the folding)? If I'm not mistaken they are defined in the C99 standard- 2) Is it possible to pull this out of llvm and make it somehow user-definable? For example I also want the float functions (e.g. sinf, cosf) to be folded or any custom function -Jochen
2013 Jan 22
0
[LLVMdev] sincos optimization
On 22/01/13 05:30, Redmond, Paul wrote: [...] > I'm looking at http://llvm.org/bugs/show_bug.cgi?id=13204 which involves converting calls to sin and cos to sincos (when available) > > Initially I thought about transforming calls to sinf/cosf to sincosf. However, I don't think this is a legal transformation given that a declaration for a function called sinf is not necessarily the standard library function. I've actually just dealt with this --- standard library calls, including sinf, *are* promoted to intrinsics if the compile...
2005 Apr 28
0
[LLVMdev] SimplifyLibCalls Pass -- Help!
...gt; cnst' atan: * atan(0.0) -> 0.0 * atan(1.0) -> pi/4 cbrt: * cbrt(constant) -> constant' * cbrt(expN(X)) -> expN(x/3) * cbrt(sqrt(x)) -> pow(x,1/6) * cbrt(sqrt(x)) -> pow(x,1/9) ceil, ceilf, ceill: * ceil(constant) -> constant' cos, cosf, cosl: * cos(0.0) -> 1.0 * cox(-x) -> cos(x) exp, expf, expl: * exp(0.0) -> 1.0 * exp(int) -> contant' * exp(log(x)) -> x fabs, fabsf, fabsl: * fabs(cnst) -> cnst' ffs, ffsl, ffsll: * ffs(cnst) -> cnst' floor, floorf, fl...
2013 Jan 01
0
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
...D.X_X; + D.X_X = stride.X_X + stride.X_X; D.X_X = (integer(kind=X)) k_X; D.X_X = D.X_X * D.X_X; D.X_X = D.X_X + D.X_X; - D.X_X = y.offset; - D.X_X = D.X_X + D.X_X; - D.X_X = MEM[(real(kind=X)[X:] *)D.X_X][D.X_X]; + D.X_X = D.X_X + offset.X_X; + D.X_X = *y_X(D)[D.X_X]; D.X_X = cosf (D.X_X); D.X_X = acosf (D.X_X); D.X_X = D.X_X + D.X_X; - MEM[(real(kind=X)[X:] *)D.X_X][D.X_X] = D.X_X; + *xy_X(D)[D.X_X] = D.X_X; D.X_X = i_X == D.X_X; i_X = i_X + X; if (D.X_X != X)
2015 Jul 29
2
[LLVMdev] x86-64 backend generates aligned ADDPS with unaligned address
...quot;x86_64-unknown-linux-gnu" @offset_array2 = internal constant [8 x i64] [i64 60, i64 4, i64 12, i64 20, i64 28, i64 36, i64 44, i64 52] @offset_array3 = internal constant [8 x i64] [i64 12, i64 20, i64 28, i64 36, i64 44, i64 52, i64 60, i64 4] declare float @sinf(float) declare float @acosf(float) declare float @asinf(float) declare float @atanf(float) declare float @ceilf(float) declare float @floorf(float) declare float @cosf(float) declare float @coshf(float) declare float @expf(float) declare float @logf(float) declare float @log10f(float) declare float @sinhf(float) de...
2012 Aug 02
2
[LLVMdev] Proposal to merge SimplifyLibCalls into InstCombiner
...__strcat_chk, __strncat_chk. 2. `SimplifyLibCalls`: strcat, strncat, strchar, strrchr, strcmp, strncmp, strcpy, strncpy, strlen, strpbrk, strtol, strtod, strtof, strtoul, strtoll, strtold, strtoull, strtold, strtoull, strspn, strcspn, strstr, memcmp, memcpy, memmove, memset, __strcpy_chk, cosf, cos, cosl, powf, pow, powl, llvm.pow.f32, llvm.pow.f64, llvm.pow.f80, llvm.pow.f128, llvm.pow.ppcf128, exp21, exp2, exp2f, llvm.exp2.ppcf128, llvm.exp2.f128, llvm.exp2.f80, llvm.exp2.f64, llvm.exp2.f32, floor, cell, round, rint, nearbyint, ffs, ffsl, ffsll, abs, labs, llabs, isdigit, i...
2015 Jan 20
3
[LLVMdev] strlen in fast-isel
It seems that fast-isel for intel does not handle strlen. It's a general problem in fast-isel . ~/llvmw/build/Deb~/llvmw/build/Debug+Asserts/bin/clang -O0 -mllvm -fast-isel-verbose -mllvm -fast-isel strlen1.c strlen1.c:12:3: warning: implicitly declaring library function 'printf' with type 'int (const char *, ...)' printf("%i\n", len); ^
2014 Aug 07
3
[LLVMdev] MCJIT generates MOVAPS on unaligned address
MCJIT when lowering to x86-64 generates a MOVAPS (Move Aligned Packed Single-Precision Floating-Point Values) on a non-aligned memory address: movaps 88(%rdx), %xmm0 where %rdx comes in as a function argument with only natural alignment (float*). This x86 instruction requires the memory address to be 16 byte aligned which 88 plus something aligned to 4 byte isn't. Here the